1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  caved in:  Algorithms for for storing free space. -->
<!--X-From-R13: Qvzev <pvzev1Ntgr.arg> -->
<!--X-Date: Sun, 05 Apr 1998 09:10:24 +0000 -->
<!--X-Message-Id: 35272685.3800398E#gte,net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.980404190913.4105A&#45;100000#shamen,cyberhighway.net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev]  caved in:  Algorithms for for storing free spac</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cimri1#gte,net">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00028.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00030.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00024.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00078.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00029">Author</A>
&nbsp;|&nbsp;<A HREF="#00029">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00029">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</LI>
<LI><em>From</em>: Cimri &lt;<A HREF="mailto:cimri1#gte,net">cimri1#gte,net</A>&gt;</LI>
<LI><em>Date</em>: Sat, 04 Apr 1998 22:36:53 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:cimri#technologist,com">cimri#technologist,com</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
I've always loved and still remain attached to the VMS lookaside list
mechanism, but then I suppose the reason is more emotional and
nostalgic
now.  But anyway, it actually had 4 lists:

- pagedyn - a big pile o' mem in one huge piece, pageable
- npageyn - same, but locked in mem
- srp     - small request packets, 32 bytes in size
- irp     - i/o request packets, forgetting size now
- lrp     - large request packets, 512 byes in size as I recall

Strictly speaking only the last three were the lookaside lists.

Anyway, so whenever possible you allocate in chunks tailored to
the thing you are allocating, and of course keep a bitmap in
npagedyn representing the used/unused status of any packet in
the respective lookaside list.

Memory fragmentation of course never happened in the lookaside lists.
They could be grown dynamically too, if you like.  Page and npage dyn
could theoretically become fragmented, but you just made sure you
only used them for things that either aren't going to be released,
or are in very nice sizes for ease of release, etc.

Oh well, hope that helps.

Jay//Cimri

Ben Greear wrote:
&gt; 
&gt; Well, after I quit being so bone-headed, (and envisioned a delete option
&gt; for my db) I quickly saw that I needed to manage free space much
&gt; better for my db.
&gt; 
&gt; I'm sure this has been done many times before, but any quick hints would
&gt; be welcome.  I want to keep with a single db-file approach, wich rules out
&gt; the (really cool) idea involving powers of 2 that was posted recently...
&gt; 
&gt; Perhaps an array of linked lists(stacks would be fine), the array being 32
&gt; long, mimicing the powers of two idea?
&gt; 
&gt; Each stack will hold seek positions into the DB file....
&gt; 
&gt; So here's a question, what's a good way to determine the
&gt; power of two that is optimal for the storage space needed?
&gt; 
&gt; A binary search wouldn't be too bad, just wondering if there's
&gt; a better (constant) method??
&gt; 
&gt; Enjoy,
&gt; Ben
&gt; 
&gt; Ben Greear (greear#cyberhighway,net)  <A  HREF="http://www.primenet.com/~greear">http://www.primenet.com/~greear</A>
&gt; Author of ScryMUD:  mud.primenet.com 4444
&gt; <A  HREF="http://www.primenet.com/~greear/ScryMUD/scry.html">http://www.primenet.com/~greear/ScryMUD/scry.html</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00024" HREF="msg00024.html">caved in:  Algorithms for for storing free space.</A></STRONG>
<UL><LI><EM>From:</EM> Ben Greear &lt;greear#cyberhighway,net&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00028.html">Re: [MUD-Dev]  GRUMPS</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00030.html">Re: [MUD-Dev] internet connections</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00024.html">caved in:  Algorithms for for storing free space.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00078.html">Re: [MUD-Dev] caved in: Algorithms for for storing free space.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00029"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00029"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] Character development [was Re: ]</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00163" HREF="msg00163.html">Re: [MUD-Dev] Character development [was Re: ]</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 15 Apr 1998, 00:13 GMT
</LI>
</ul>
<LI><strong><A NAME="00203" HREF="msg00203.html">RE: [MUD-Dev] Character development [was Re: ]</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 16 Apr 1998, 22:50 GMT
</LI>
<LI><strong><A NAME="00204" HREF="msg00204.html">Re: [MUD-Dev] Character development [was Re: ]</A></strong>, 
Alex Bertoglio <a href="mailto:alexb#internetcds,com">alexb#internetcds,com</a>, Fri 17 Apr 1998, 04:24 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00024" HREF="msg00024.html">caved in:  Algorithms for for storing free space.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sun 05 Apr 1998, 02:31 GMT
<UL>
<LI><strong><A NAME="00029" HREF="msg00029.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></strong>, 
Cimri <a href="mailto:cimri1#gte,net">cimri1#gte,net</a>, Sun 05 Apr 1998, 09:10 GMT
</LI>
<LI><strong><A NAME="00078" HREF="msg00078.html">Re: [MUD-Dev] caved in: Algorithms for for storing free space.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 08 Apr 1998, 23:50 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00021" HREF="msg00021.html">Re: [MUD-Dev]  GRUMPS</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 04 Apr 1998, 23:30 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00027" HREF="msg00027.html">Re: [MUD-Dev]  GRUMPS</A></strong>, 
maddog <a href="mailto:maddog#best,com">maddog#best,com</a>, Sun 05 Apr 1998, 04:55 GMT
</LI>
<LI><strong><A NAME="00028" HREF="msg00028.html">Re: [MUD-Dev]  GRUMPS</A></strong>, 
maddog <a href="mailto:maddog#best,com">maddog#best,com</a>, Sun 05 Apr 1998, 07:06 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>