Re: buffer.c of buffer.patch

From: Daniel W. Burke (dwb@IX.NETCOM.COM)
Date: 08/01/97


On Mon, 28 Jul 1997, George wrote:

> Here's the heart of the improved buffer system, buffer.c.  I'm still
> hunting down functions that don't properly release_buffer() but I'll post
> the preliminary patch on my web page.  Not releasing the buffers doesn't
> leak memory though, release_all_buffers() will take care of those forgotten
> about.  (in other words, the patch is usable)
>
> Usage: buffer_p = get_buffer(size_needed);
>        release_buffer(buffer_p);
> Add: release_all_buffers(); (somewhere in game_loop)
>

I like this system, because widly used, this appears to be a real memory
saver..... however, if there is something like release_all_buffers()
what would be the point to calling release_buffer() since the next call
to get_buffer() reuses any available buffers?
Seems that it would actually be a time saver (although we're probably
only talking minor times here, but anyways) to leave the unused buffers
to "idle" out in 5 minutes in release_all_buffers().

Also, given this system, you could make strings longer then you'll need,
and not have to worry about wasting memory....

all in all, I like this, but I'm wondering if anyone has any comments
about it?  the practicality of it, or if it's really all that great, etc...



Brazil - Implementor of AddictMUD
         addict.realms.org  4000
         206.185.32.8       4000


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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