New Firewall (hpf) for DragonFlyBSD

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Fri Jan 9 16:37:00 PST 2004


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00007.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040109/9f112858/attachment-0017.obj>


More information about the Submit mailing list