i found this may this help you to know what is your prob
Code:
/* DESCRIPTION: SZ_GetSpace
// PATH: SZ and MSG functons
//
// I believe this returns a pointer to a chunk of memory within the hunk that's
// being reallocated to another purpose. Kind've gerrymandering the sizebuf_t
// structure. it's NOT returning the number of free bytes.
//
*/