libwebsockets
Lightweight C library for HTML5 websockets
helpers for allocator instrumentation

Alloc Metadata APIs

lws_alloc_metadata

These helpers let you rapidly instrument your libc or platform memory allocator so that you can later dump details, including a backtrace of where the allocation was made, for every live heap allocation.

You would use it at peak memory usage, to audit who is using what at that time.

Effective compression is used to keep the metadata overhead to ~48 bytes per active allocation on 32-bit systems.