PMDK memory debugging
Memory debugging can be used to track all allocations made by libpmemobj
,
an object store library that is part of the Persistent Memory
Development Kit (PMDK).
To use PMDK memory debugging, enable memory debugging in the Run dialog. Optionally, a backtrace can be stored for each allocation. If memory debugging is not enabled, only the call site of the allocation is stored. No other configuration options have an effect on PMDK.
When the pool is opened with pmemobj_open
, all the allocations that exist in the
pool are tracked. The call site is where the pool is opened. The root object of the
pool is not tracked. Allocation tracking persists after an aborted transaction.
When tracking allocations, to see if a pointer was allocated by PMDK,
right-click on a pointer in a variable view and select View Pointer Details.
In the pointer details, you also see the backtrace, or call
site, of the allocation. In the main menu, , and
, are enabled. By default, allocations made by libc
are shown. To see the Memory Usage window, Allocation Table, and
Memory Statistics window that you see with regular memory debugging, select
PMDK in Allocations from. The sizes displayed are the sizes returned by
pmemobj_alloc_usable_size
, not the sizes you request.