Re: [NEWBIE] buf switches

From: Jon A. Nielsen (nielsenja@worldspy.net)
Date: 02/22/00


> I did some testing to see what increases the numbers.
> Found that "show zones" increases buf switches by 2
> (or 3 possibly).

All a buf switch is is when the MUD's write_to_output() function tries to
write something to a players out buffer that is too small to hold the entire
string to be written;  the buffer is switched from a small buffer
(char[1024]) to a large buffer (~char[12256 - MAX_PROMPT_LENGTH).  CircleMUD
uses the small buffer to conserve memory, but for larger outputs (zlist if
you have a lot of zones, etc), it needs to use something larger.  It's not
something you should be worrying about, as far as I can tell.

Just as a sidenote to this:  buf_overflows are when the large outbuffer is
already being used and there's still not enough space.  (ever get the
"**OVERFLOW**" message before?)

Note that all this information was very easily gathered from comm.c's
write_to_output() using the ever-useful 'grep'.

___
Jon A. Nielsen
Lazarus of Spear of Insanity MUD
spear.kilnar.com:1066
http://spear.kilnar.com/


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT