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
bytes or more. This is an experimental code, not a definitve one. I
see how I can update it for working under 64 bits architectures.
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)
\ ASCII Ribbon Campaign
/ \ Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
More information about the Submit