Swap File in Circle

From: Cervo (chrisf@PTD.NET)
Date: 07/03/98


Well there is a mud that has a limit of memory it can use, and the limit
is pretty steep.  Anyway, it has no limit in disk space, just RAM, so a
swap file seems the perfect solution to limited ram and infinite disk
space.  Also, no player is in all the zones at the same time, so writing
that part of the zone index into the disk wouldn't be a bad idea, and when
a player enters the zone, loading it from the disk.  As far as mob
wandering, possibly do it in shifts and go through the zones, for although
swapping is slow, it is not that slow.  Maybe make a swap array with a
bool swapped flag to show which zones are swapped.  And also an internal
timing system to locate prime canidates for a swap.  Also perhaps a way to
get it almost compatible between the OS's with the exception of a bit of
ASM code.  I am sure there are better ways of swapping than the cheesy
ones that I am using, I would be grateful for someone to point me in the
direction of a web tutorial on swapping or something like that...

Also, I have heard of mud sites that charge via the ram usage, and charge
even more for that than disk usage, so in the case of these scenarios
Swapping is not too bad of a solution.  There are some programs that have
memory cache's and stuff, and do swapping to the disk when the memory
cache is full.  Netscape and other web browsers just write the html file,
although some programs actually write memory pages there.  Also I wonder
if there is a way to do it without defining my own memory page handler,
maybe just swapping space already malloced.


--------------------------------------------------------------------
--------------------------------------------------------------------
|| Cervo the redoC retsaM and wielder of the Power Cosmic//////////
||                                      /////////////////////
||          //////////////////////////////////////////
|||||||||||///////////////


     +------------------------------------------------------------+
     | 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/15/00 PST