On 08/05/2016 03:49 PM, H.Loom wrote:
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
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
On 08/05/2016 12:55 PM, Mark J Twain wrote:
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 alo
On Friday, 5 August 2016 at 21:07:02 UTC, H.Loom wrote:
On Friday, 5 August 2016 at 20:54:59 UTC, Mark "J" Twain wrote:
On Friday, 5 August 2016 at 20:43:12 UTC, H.Loom wrote:
On Friday, 5 August 2016 at 19:55:22 UTC, Mark "J" Twain
wrote:
[...]
You can wrap the C memory allocations function
On Friday, 5 August 2016 at 20:54:59 UTC, Mark "J" Twain wrote:
On Friday, 5 August 2016 at 20:43:12 UTC, H.Loom wrote:
On Friday, 5 August 2016 at 19:55:22 UTC, Mark "J" Twain wrote:
[...]
You can wrap the C memory allocations functions with a version
identifier, e.g
version(stat)
{
On Friday, 5 August 2016 at 20:43:12 UTC, H.Loom wrote:
On Friday, 5 August 2016 at 19:55:22 UTC, Mark "J" Twain wrote:
[...]
You can wrap the C memory allocations functions with a version
identifier, e.g
version(stat)
{
__gshared size_t[size_t] sizes;
}
version(stat)
{
auto mallo
On Friday, 5 August 2016 at 19:55:22 UTC, Mark "J" Twain wrote:
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 allo
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 intrin