4 ms·
> zero size allocation Is this useful for anything? I wrote my own memory allocator, is there any reason I might want to support this?
by matheusmoreira 3y ago
> zero size allocation
Is this useful for anything? I wrote my own memory allocator, is there any reason I might want to support this?
- quelsolaar 3y agoIm not recommending doing this, but you may want to allocate an address to use as a magic number. NULL is a magic number address that is guaranteed never to be a valid allocation. By allocating an address, you can creat your own magic number, that wont ever be used by any other allocation so you can give it special meaning in your code.