Another idea for malloc/free:

On init it gets passed a small static data structure which includes the
size of the region, and a pointer to its start address.

If start address + size >= HIMEM, then it's an error.

Otherwise the statically sized heap just starts at the end of the program.
So the memory doesn't have to be part of the .CO, it just needs to be
considered in CLEARing RAM.

And it's at the end so it can't mount a sneak attack on the files ;-) But
watch out system variables...

-- John.

Reply via email to