working on prototypes for efficient in-place memory management in c