]> jfr.im git - irc/atheme/libmowgli-2.git/commit
core/heap.disabled: invoke underlying allocator directly
authorAaron Jones <redacted>
Mon, 21 Jan 2019 07:51:10 +0000 (07:51 +0000)
committerAaron Jones <redacted>
Mon, 21 Jan 2019 07:52:58 +0000 (07:52 +0000)
commit1a7a27f396dc957460501f1a6d2ab284175847b9
treebf2d6b33a90a3edcb87bfdf55ab9db2a47be8471
parent2ea73fc31b8cc00e6bceed1c1dd06ad9cb5e80bc
core/heap.disabled: invoke underlying allocator directly

The heap object stores its allocator for its entire lifetime, so
there's no need to call mowgli_alloc()/mowgli_free(), which also
stores the allocator tag behind the returned pointer.

This will (sometimes) reduce the memory consumption of every
allocation by a pointer and is slightly more efficient.

Also add some debugging assertions to validate the integrity of
the given/chosen allocator.
src/libmowgli/core/heap.disabled.c