3 ms·
Are there tools that tell you where all your allocations come from? I imagine Valgrind but is there anything more lightweight? I almost always write pool based
by aspaceman 7y ago
Are there tools that tell you where all your allocations come from? I imagine Valgrind but is there anything more lightweight?
I almost always write pool based memory allocators for my projects (CG, games), so I typically log that info myself. What would other folks use to profile that info?
- pjscott 7y agoOn Apple's platforms, Instruments has a memory allocation logging tool that's very nice to use. Just attach to a program, no need to recompile: https://www.agnosticdev.com/blog-entry/ios/profiling-memory-allocations-ios-instruments https://www.agnosticdev.com/blog-entry/ios/profiling-memory-... As a nice bonus, it can also look for memory leaks by running what is essentially a conservative garbage collector on your heap and reporting unreachable allocations.
- ereyes01 7y agoGo's pprof comes with a great memory (and cpu + more) profiler: https://blog.golang.org/profiling-go-programs https://blog.golang.org/profiling-go-programs
- pcwalton 7y agojemalloc has a lot of profiling features you can turn on.