allocating 14KB memory per packet compression/decompression
results in vm_fault
Peter Jeremy
PeterJeremy at optushome.com.au
Fri Nov 4 01:49:09 PST 2005
[dropping -net]
On Thu, 2005-Nov-03 22:56:30 -0800, kamal kc wrote:
>as i said before the compression/decompression works
>fine. but soon the kernel would panic with one
>of the vm_fault: error message.
What's the exact panic and traceback? Have you enabled the various
sanity checks (WITNESS, DEBUG_MEMGUARD, INVARIANTS)?
>what would be the best possible way to
>allocate/deallocate 14KB memory per packet without
>causing vm_faults ??
The most efficient way would be to statically allocate the dictionary
and string tables. The downside is that you then need to serialise
the [de]compression.
You could look at zone(9) as an alternative to malloc(9).
>is there anything i am missing ??
- Are you correctly allocating the mbuf for the outgoing packet correctly?
- Are you correctly freeing the mbuf for the incoming packet?
- Are you sure that you're not writing outside the bounds of one of the
memory blocks you're allocating?
--
Peter Jeremy
More information about the freebsd-hackers
mailing list