Hmmm, the only way I can think off the top of my head to track the
calling function would be to put a break on the function in gdb and
check the stack, only this could take a while, depending on how many
players are loading, how many offline players are being loaded, etc...
probably a better way is going to be to evaluate what the need for
knowing the calling function is... you can probably grep for new_pcdata
and come across only a few instances in your entire codebase... I mean,
if I even remember correctly (and it's been a whiiiiiiile since I did
any actual ROM coding :D), new_pcdata is really only called from a
couple places... nanny, I believe, and probably fread_char... and if
you've got a function to load offline characters, like pload, or finger,
or something like that, then those would be the additional functions
that might utilize new_pcdata... but free_char should automatically
free_pcdata within it, so as long as you're freeing the CHAR_DATA *
variable, the pcdata should be freed along with it... but if you
absolutely need to know the calling function at specific points of
gameplay, the only thing I can come up w/ right now is using gdb and
breakpoints, but I'm far from the best coder, so we'll see if anyone
else throws in some additional ideas :)

Richard Lindsey.

-----Original Message-----
From: Valnir [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 16, 2006 8:40 AM
To: [email protected]
Subject: Rogue Buffers.

Hey guys, I've got a little issue. I d/l and installed a snippet from
Mud 
Magic that will track the number of open buffers and tell me from what 
function they where called. It's working great, and has been really
helpful 
for tracking down stuff that doesn't get freed properly.

The issues is as follows. The only open buffers I have that seem to be
not 
getting freed are a few that are called from new_pcdata, and yes, I know

that every character that is logged in SHOULD have an open one from
there. I 
have a few more than there are people connected. Does anyone know a way
to 
track back what function CALLED new_pcata? I guess I should say what 
function called the load_char function, or called the get_char_offline
which 
called the load_char.... You can see why I'm having a problem finding
these 
on my own.

Any help is appreciated, thanks!

- Valnir

-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to