[Circle] memory map ?

From: James T. Rhone (ujtr@lady.cs.sunyit.edu)
Date: 07/25/96


Slowly but surely my mud creeps up into the mem usage danger zone.  After 
about 16 hours uptime we usually run out of memory.  I have gone over the 
code quite a bit lately trying to streamline it, but to no avail.  What 
I'm looking for is some type of command in gdb to lay out a map of my 
memory usage, preferrably listed by variable name, so I can view what is 
allocated at what times.  This would be very useful, but I haven't found 
anything that does exactly what I want...Sure I can get a list of global 
variables, but not how much memory thay happen to be using.  Ints and so 
forth are obvious, but I need something that gives me a visual idea of 
how much memory a certain pointer is pointing to, or where exactly I am 
losing the memory at.  
I realize I could go through the code and route all mallocs through a 
common function which logs where every request came from, but I'd prefer 
to use some obscure gdb feature to do so :)

Does something like that exist in gdb and if not, are there any other 
suggestions?

jtrhone
aka
vall
RoA
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/07/00 PST