Expand description
Raw bindings to jemalloc
Constants§
- Do not use a thread-specific cache (tcache).
- Initialize newly allocated memory to contain zero bytes.
Statics§
jemalloc
’s background_thread support is known not to work on these targets:- targets that don’t support unprefixed
malloc
jemalloc
is known not to work on these targets:jemalloc-sys
is not tested on these targets in CI:- Compile-time string of configuration options.
- Allows overriding the function which emits the text strings forming the errors and warnings if for some reason the
STDERR_FILENO
file descriptor is not suitable for this.
Functions§
- Align the memory allocation to start at an address that is a multiple of
align
, where a is a power of two. - Use the arena specified by the index
a
. - Align the memory allocation to start at an address that is a multiple of
1 << la
. - Use the thread-specific cache (tcache) specified by the identifier
tc
. - Allocates
size
bytes of memory at an address which is a multiple ofalignment
. - Allocates zero-initialized space for an array of
number
objects, each of whose size issize
. - Deallocates previously-allocated memory region referenced by
ptr
. - free⚠Deallocates previously-allocated memory region referenced by
ptr
. - General interface for introspecting the memory allocator, as well as setting modifiable parameters and triggering actions.
- Like
mallctl
but taking amib
as input instead of a name. - Translates a name to a “Management Information Base” (MIB) that can be passed repeatedly to
mallctlbymib
. - Allocates
size
bytes of uninitialized memory. - Writes summary statistics via the
write_cb
callback function pointer andcbopaque
data passed towrite_cb
, ormalloc_message
ifwrite_cb
is null. - Returns the real size of the previously-allocated memory region referenced by
ptr
. - Allocates at least
size
bytes of memory according toflags
. - Returns the real size of the allocation that would result from a
mallocx
function call with the same arguments. - Allocates
size
bytes of memory at an address which is a multiple ofalignment
and is placed in*ptr
. - Resizes the previously-allocated memory region referenced by
ptr
to be at leastsize
bytes. - Resizes the previously-allocated memory region referenced by
ptr
tosize
bytes. - Returns the real size of the previously-allocated memory region referenced by
ptr
. - Deallocates previously-allocated memory region referenced by
ptr
withsize
hint. - Resizes the previously-allocated memory region referenced by
ptr
in place to be at leastsize
bytes, returning the real size of the allocation.
Type Aliases§
- Extent allocation function.
- Extent commit function.
- Extent deallocation function.
- Extent decommit function.
- Extent destruction function.
- Extent lifetime management functions.
- Extent merge function.
- Extent purge function.
- Extent split function.