cmalloc
Dave Hein
Posts: 6,347
Here is another object from CLIB.· This one is used to dynamically allocate memory blocks.· It contains the spin versions of malloc, free, calloc and realloc.· I have also attached a test program for this object.· I will probably remove realloc from the final version to save some space.· This version uses 16-bit variables for the memory address and block size.· I am trying to decide whether I should keep it that way, or use four extra bytes per memory block to support more than 64 Kbytes of memory.
spin
18K