1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  caved in:  Algorithms for for storing free space. -->
<!--X-From-R13: Pra Uerrne <terrneNploreuvtujnl.arg> -->
<!--X-Date: Mon, 06 Apr 1998 02:23:07 +0000 -->
<!--X-Message-Id: Pine.LNX.3.96.980405191858.7987A&#45;100000#shamen,cyberhighway.net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 9804051546.8wb0@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--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: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="msg00034.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00036.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00031.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00030.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00035">Author</A>
&nbsp;|&nbsp;<A HREF="#00035">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00035">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>: Ben Greear &lt;<A HREF="mailto:greear#cyberhighway,net">greear#cyberhighway,net</A>&gt;</LI>
<LI><em>Date</em>: Sun, 5 Apr 1998 19:22:14 -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>
On Sun, 5 Apr 1998, Chris Gray wrote:

&gt; [Ben Greear:]
&gt; 
&gt; :A binary search wouldn't be too bad, just wondering if there's
&gt; :a better (constant) method??
&gt; 
&gt; Isn't there one of those bit-twiddle methods that does that? Or can you
&gt; only find the lowest one bit or something? Not sure where to look for
&gt; the stuff, however. Anyone?

I thought of this..might be ok:

int pwr = 0;
int size; //this is what we want to find
int i = 0;

while ((size &gt;&gt; i) &gt; 0) {
	pwr++;
	i++;
}

pwr should be the base of two you'll need.

This is a messy example..and might not even work...just a working
idea.....

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>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00031" HREF="msg00031.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></STRONG>
<UL><LI><EM>From:</EM> cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray)</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00034.html">Re: [MUD-Dev]  GRUMPS</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00036.html">[MUD-Dev] GRUPMS?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00031.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00030.html">Re: [MUD-Dev] internet connections</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00035"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00035"><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>[MUD-Dev] Re: MUD Development Digest</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00283" HREF="msg00283.html">[MUD-Dev] Re: MUD Development Digest</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 30 Apr 1998, 21:26 GMT
<UL>
<LI><strong><A NAME="00286" HREF="msg00286.html">[MUD-Dev] Re: MUD Development Digest</A></strong>, 
Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Thu 30 Apr 1998, 23:01 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00036" HREF="msg00036.html">[MUD-Dev] GRUPMS?</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Mon 06 Apr 1998, 04:58 GMT
<LI><strong><A NAME="00031" HREF="msg00031.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 05 Apr 1998, 18:39 GMT
<UL>
<LI><strong><A NAME="00035" HREF="msg00035.html">Re: [MUD-Dev]  caved in:  Algorithms for for storing free space.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Mon 06 Apr 1998, 02:23 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00030" HREF="msg00030.html">Re: [MUD-Dev] internet connections</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 05 Apr 1998, 16:41 GMT
<LI><strong><A NAME="00026" HREF="msg00026.html">Re: [MUD-Dev]  (fwd) Re: Roleplaying</A></strong>, 
Travis Casey <a href="mailto:efindel#polaris,net">efindel#polaris,net</a>, Sun 05 Apr 1998, 04:00 GMT
<LI><strong><A NAME="00025" HREF="msg00025.html">Re: [MUD-Dev] Character development [was Re: ]</A></strong>, 
Travis Casey <a href="mailto:efindel#polaris,net">efindel#polaris,net</a>, Sun 05 Apr 1998, 02:42 GMT
<UL>
<LI><strong><A NAME="00079" HREF="msg00079.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 08 Apr 1998, 23:56 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>