1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: caved in:  Algorithms for for storing free space. -->
<!--X-From-R13: Pra Uerrne <terrneNploreuvtujnl.arg> -->
<!--X-Date: Sun, 05 Apr 1998 02:31:00 +0000 -->
<!--X-Message-Id: Pine.LNX.3.96.980404190913.4105A&#45;100000#shamen,cyberhighway.net -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, caved in:  Algorithms for for storing free space.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:greear#cyberhighway,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="msg00023.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00025.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00204.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00029.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00024">Author</A>
&nbsp;|&nbsp;<A HREF="#00024">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00024">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>caved in:  Algorithms for for storing free space.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: mud-dev &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: caved in:  Algorithms for for storing free space.</LI>
<LI><em>From</em>: Ben Greear &lt;<A HREF="mailto:greear#cyberhighway,net">greear#cyberhighway,net</A>&gt;</LI>
<LI><em>Date</em>: Sat, 4 Apr 1998 19:30:00 -0700 (MST)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

Well, after I quit being so bone-headed, (and envisioned a delete option
for my db) I quickly saw that I needed to manage free space much
better for my db.

I'm sure this has been done many times before, but any quick hints would
be welcome.  I want to keep with a single db-file approach, wich rules out
the (really cool) idea involving powers of 2 that was posted recently...

Perhaps an array of linked lists(stacks would be fine), the array being 32
long, mimicing the powers of two idea?

Each stack will hold seek positions into the DB file....


So here's a question, what's a good way to determine the
power of two that is optimal for the storage space needed?

A binary search wouldn't be too bad, just wondering if there's
a better (constant) method??

Enjoy,
Ben

Ben Greear (greear#cyberhighway,net)  <A  HREF="http://www.primenet.com/~greear">http://www.primenet.com/~greear</A> 
Author of ScryMUD:  mud.primenet.com 4444
<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>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00078" HREF="msg00078.html">Re: [MUD-Dev] caved in: Algorithms for for storing free space.</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
<li><strong><A NAME="00029" HREF="msg00029.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></strong>
<ul compact><li><em>From:</em> Cimri &lt;cimri1#gte,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00023.html">Re: [MUD-Dev]  GRUMPS</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00025.html">Re: [MUD-Dev] Character development [was Re: ]</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00204.html">Re: [MUD-Dev] Character development [was Re: ]</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00029.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00024"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00024"><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>
<LI><strong><A NAME="00093" HREF="msg00093.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 09 Apr 1998, 17:00 GMT
<UL>
<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>
<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>
</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>