I have a core of process from a system that kills a process if it allocates memory above a configured limit. It seems the process crashed because memory is fragmented. To confirm I want to know largest available free block of memory. Is there a way I can find it from a core.
Asked
Active
Viewed 164 times
0
-
https://stackoverflow.com/questions/1386776/memory-fragmentation-profiler – Thiner Jun 28 '17 at 12:49
1 Answers
1
Suppose you are using Linux glibc, gdb plugins such as libheap, gef, pwndbg provides functionalities of inspecting the free chunks.
Also if you can make the OOM re-happen, you can try some memory allocator that have the functionality to pretty print the malloc arena layout by itself before it crashes (including jemalloc, see Use Case: Basic Allocator Statistics)
Valgrind may help if memory leaks, but I am not sure it is useful for memory fragmentation.

Thiner
- 345
- 1
- 9