Get size of mem to free by free

Mark J Twain via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 5 12:55:22 PDT 2016


I use malloc to allocate some memory, then free it later. For 
monitoring purposes, I would like to know how much is free'ed by 
free by just knowing the object. Or, rather, given a ptr 
allocated by malloc, bet the block size it allocated from the ptr 
alone.

Some C compilers have special intrinsics and such for this, does 
D have any ability? If not, any hacks? I just need something that 
works.



More information about the Digitalmars-d-learn mailing list