DragonFly BSD
DragonFly submit List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: New Firewall (hpf) for DragonFlyBSD


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Sat, 10 Jan 2004 01:36:00 +0100

On 09.01.2004, at 21:25, Sebastien Petit wrote:
Also, using ints to store pointers won't work on all architectures.
This code is i386 oriented but can be changed for storing pointers with 8
bytes or more. This is an experimental code, not a definitve one. I try to
see how I can update it for working under 64 bits architectures. What's the
architecture concerned by the problem of int for storing pointers ?

I'm not sure if I undestood your question.
int isn't guaranteed to be as wide as a pointer. So you should use either void * (or whatever) or long ints (which are IIRC guaranteed to be at least as wide as a pointer).


But, why don't you use just a char to index the next level? Okay, it might be slower than a direct address because of the additional add + multiply, yet, on today's processors this might be acceptable (in favour of using much less memory)

cheers
  simon

--
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News

Attachment: PGP.sig
Description: This is a digitally signed message part



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]