mbed-os/features/frameworks/nanostack-libservice/source/nsdynmemtracker
Mika Leppänen a9746a563a Added extended block list to dynamic memory tracker
If same allocator (alloc call) allocates multiple dynamic memory blocks,
the additional blocks are added to extended memory block list, and
the allocator list reference count and total sizes are increased.
When statistics are calculated, it is only needed to process the
allocator list, not the whole memory block list.

Added also optional hash function to calculate the (start) index where
memory block information is stored on extended memory block list. Hash
is calculated from memory block address.

It is expected that hash distributes the free index searches evenly
to whole memory area allocated for extended memory block list. So if
area is large enough, in most cases the index pointed by the hash, or
the index few indexes from that, should be empty and available for use.
Similarly, when memory block is freed, the search for the block on
the extended memory block list, starts from the index pointed by the
hash.

If hash is not used, extended memory block list searches start always
from index 0.
2020-11-18 17:31:41 +02:00
..
nsdynmem_tracker_lib.c Added extended block list to dynamic memory tracker 2020-11-18 17:31:41 +02:00