Re[2]: Increasing sizes of bit vectors

From: Gary Barnett (gbarnett@polarnet.com)
Date: 01/17/97


At [Fri, 17 Jan 1997 18:46:36 -0500]
Wyatt Bode <bode@juncol.juniata.edu> wrote:

>  Just a comment here...
>  Are you aware that the "bool" type in C is actually a unsigned char? 
>  This would be quite a waste of memory (both RAM and disk space) to use
>  an array of bool for every bitvector.  Please note, this is not a flame
>  on your technique (I tried it too, and was appalled at the big memory
>  jump. 8 times the normal mem for all bitvectors!)  It is merely a
>  friendly idea/suggestion.  
>  		-- Wyatt Bode
>  
Once again prior knowledge of Pascal and so on proves to be a disadvantage
with C. I had just assumed that a boolean value would use one bit.. (stupid me)

Next time I'll do the research before assuming I know what will happen. 

Mallory wanders off to go rewrite a core section of the mud.. and it was
working so well too (and was elegant to boot) *sigh*

--Mallory


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST