ck_malloc.h

88 views
Skip to first unread message

Ian A. Mason

unread,
Apr 4, 2016, 8:56:45 PM4/4/16
to Concurrency Kit

Hi there,

I'm trying to find some documentation on the extra arguments to free and realloc in the
ck_malloc struct.

Any pointers would be much appreciated.

Cheers, Ian.

Samy Al Bahra

unread,
Apr 4, 2016, 9:31:35 PM4/4/16
to Concurrency Kit
Hi Ian,

The extra arguments to the free callback are number of bytes of region being deallocated and bool indicating whether the memory being destroyed is vulnerable to read-reclaim races (and so, extra precautions must be taken).

For realloc, the first size_t is current number of bytes of allocation and the second is the new number of bytes. The bool indicates the same thing as free, whether safe memory reclamation of some form might be needed.

--
You received this message because you are subscribed to the Google Groups "Concurrency Kit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concurrencyki...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ian A. Mason

unread,
Apr 4, 2016, 10:10:19 PM4/4/16
to Concurrency Kit
Thanks Samy!
Reply all
Reply to author
Forward
0 new messages