heap - How to record every allocations and deallocations of memory on a program? -


I want to see that the fragmentation is due to the increased memory usage of my twisted server I have posted a question here: < / P>

Now, what I'm going to do, imagine the heap. I found an article: The figure of the heap in the article is something I want. It is not difficult for me to draw such a figure with matplotlib or other tool. I have the hardest work: how to record memory allocation and deallocation?

I know that I can modify the source code of CPYthon, add some logging code to omalloc.c and recompile Python, and run my server I can use modified CPYthon. But though, I do not want to waste time with that time. Then I am looking for some available tools. I know that a device valgrind can be used to detect a memory leak, but I do not know how to record allocation and deallocation.

  • Invalid free
  • But I think its mammock can detect something like this:

    • Read the invalid
    • My questions are:

      • Record the deallocations of memory with all the allocation and time, address and size <
      • How can I do this with valgrind?
      • If I can not, should I write a module for this?
      • Or is there any better equipment can this get?
      • Thanks.

    Answering the question about alternate devices:

    I know That's a "pin" tool, maybe it's worth checking:


    Comments

    Popular posts from this blog

    oracle - The fastest way to check if some records in a database table? -

    php - multilevel menu with multilevel array -

    jQuery UI: Datepicker month format -