>>>>> "Alfred" == Alfred Perlstein <[EMAIL PROTECTED]> writes:

Alfred> Why not use a linked list, with a hash header to reduce search
Alfred> times.

Well... I think a linked list is already created for me (we're talking 
netgraph hooks here) and a hash isn't required since I can canive my
problem to fit a completely used set of integers (by choosing unused
integers when I create a new hook).

That's not the problem.  I'm just concerned about statically
allocating (say) 10K pointers in that array for each instance of my
node and then only using 5 in one node and 5K in another.

Alfred> I don't think there is a realloc for the kernel btw.

Trivial exercise left to the reader, really.  I was just curious if
this type of behaviour tends to badly frustrate memory allocation in
the kernel.

Is it good, for instance, to plan reallocations at roughly the page
size in increments?

Dave.

-- 
============================================================================
|David Gilbert, Velocet Communications.       | Two things can only be     |
|Mail:       [EMAIL PROTECTED]             |  equal if and only if they |
|http://www.velocet.net/~dgilbert             |   are precisely opposite.  |
=========================================================GLO================


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to