Alex Martir
|
Heap Allocation/Deallocation Statistics On QNX 7.0
|
Alex Martir
09/30/2021 7:41 PM
post121601
|
Heap Allocation/Deallocation Statistics On QNX 7.0
Hey all, thanks for taking the time to read through.
My problem is the following:
I have a QNX process that I've created that keeps track of some system performance statistics such as CPU usage for
various processes, threads, etc. I'd also like to keep track of the number of heap allocations/deallocations that are
used within different system processes (ie calls to malloc, free, etc); and I'd like to do this programatically, either
by means of ioctl/devct or any other means you can think of. I'm currently looking into the following devctl commands:
devctl(fd, DCMD_PROC_MAPINFO, mbuffers, sizeof(mbuffers), &num_segments);
devctl(fd, DCMD_PROC_PAGEDATA, mbuffers, sizeof(mbuffers), &num_segments);
which return some number of memory segments associated with the process, including stack, data, shared object memory
spaces, etc.
I'm not sure if this is the correct approach, and any help/guidance is greatly appreciated. For some more context I am
using QNX 7.0
|
|
|