Jed,

  You're right. The operating system does release the memory once it's
exited.
But, I run the mud with memory checkers which make a list of every alloc and
every free.
If they don't match, it throws an error.  I want these errors to be REAL
memory leaks :)

And, yes, ROM does keep a list of the 'freed' memory, but as far as I can
tell there's no way to get the allocated memory and the free memory with
what's existing.

I might just go ahead and build my linked lists of allocs to free at the
end.
This will help me find real memory leaks when I shut the mud down.

Thanks, 

> -----Original Message-----
> From: Jed Yang [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 09, 2003 12:32 PM
> To: Jason Gauthier; ROM Mailing List
> Subject: Re: Freeing recycled memory
> 
> I have a question, maybe the question is dumb because I 
> totally missed your point.
> 
> Isn't allocated memory always automatically freed upon 
> program termination?
> Then what is the point of freeing them yourself? Furthermore, 
> I thought ROM just keeps a list of, say desc's, structures 
> that are not in use; and remove it from the linked list of 
> unused to the list of current, again say desc's, structures 
> and initialize for the use. So the memory allocated to a 
> structure is never released for another structure to use. So 
> if you really want to, couldn't you just free all the unused 
> desc's followed by all the unused ch's and the note's and so 
> on and so forth... Don't kick me if I totally messed up your 
> point, though.
> 
> Htam
> ----- Original Message -----
> From: "Jason Gauthier" <[EMAIL PROTECTED]>
> To: "ROM Mailing List" <[email protected]>
> Sent: Tuesday, September 09, 2003 5:27 AM
> Subject: Freeing recycled memory
> 
> 
> > I know, this is pretty stupid, because it's permanently allocated :P
> >
> > Whatever.  I'm trying to actually memory leak check my mud, and it's
> > difficult when all the recycled memory is not freed.
> >
> > What can I do to keep track of the allocations to actually 
> free them (upon
> > mud exit).
> >
> > I considered making a linked list of the allocations but 
> then decided I
> > didn't want to have to allocate a list to keep track of 
> allocations :)
> >
> > I'm not seeing an easy way with what's already there to do 
> this.  Perhaps
> > I'm over looking something.
> >
> > Suggestions?
> >
> > Thanks,
> > Jason
> >
> > -- 
> > ROM mailing list
> > [email protected]
> > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 

Reply via email to