bop-langs/cbop

'Omniscient' Malloc Package

Closed this issue · 0 comments

The general idea is to use a shared memory region to contain all block headers. These headers contain bit vectors for it's allocation state. Instead of dividing the free lists as is currently done in dmmalloc, have a 1-to-1 function that takes the VA of a memory region and computes the header and can also do the inverse. This will eliminate the need to carve up the memory region and will now mean only the payloads need to be copied. Frees could (probably) happen at the same time header structure:

typedef struct{
  short bit_vector; //set bits to 1 for allocated in SEQ (pre-ppr), Undy allocation, PPR allocation.
  //one of these next pointers will be used for non-ppr execution; probably Undy
  struct header * next_undy; 
  struct header * next_ppr; 
} header;