1 year ago
#187861
Aditi Partap
How to trace memory allocations in Apache httpd server?
I am running apache benchmark (ab) with server [httpd2.4.52] running locally. I want to track how many memory allocations and what size allocations does the server make. I run 'valgrind --trace-malloc=yes ab -n 10 http://127.0.0.1/' But the number of allocations is ~4.6k regardless of the number of requests (I tried 10,100,1000).
- Is this because Apache uses its own custom memory allocator?
- How can I track the allocations (specifically #allocations, total/avg size of allocations) for this custom allocator?
- This page mentions an option named ALLOC_USE_MALLOC in apr code, but, I could not find this option in apr source code (I checked versions 1.7.0, 1.4.8, 1.4.2 and httpd2.0.51)
apache
valgrind
apr
tracemalloc
0 Answers
Your Answer