Get size of mem to free by free
H.Loom via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 5 15:49:30 PDT 2016
On Friday, 5 August 2016 at 21:25:41 UTC, Ali Çehreli wrote:
> malloc stores the allocation size and other information right
> before the pointer that it returns.
TIL. Is it guaranteed for any malloc implementation ? I'm a bit
surpised to read that. I thought these kind of trick was only
used for aligned allocations !
More information about the Digitalmars-d-learn
mailing list