exec provides a call where you ask for a block of memory at an exact adress with an exact size. if it's free it gives to you, else it tells you the alloc failed... maybe i recall it was called "allocabs"? So for getting aligned to 64k, just iterate over the mmory range you want and ask for addresses with 64k alignement.... you will then need to also get a look at the memory maps from exec to determine where is chipmem and fastmem available (please don't hardcode that ;)
|