Adrian Chadd wrote:
> Are you sure its alignment? I'm dead sure its malloc overhead.
> 16 bytes is a big much for struct alighment. Also, when you
> set it to 32 bits, did you drop the sdirno type down to a char
> when you did the size comparison?
It is a combination of alignment and malloc overhead. malloc can't know alignment
requirements, so it has to assume the worst, plus that it has it's own overhead.
What I meant to say is that it ends up causing malloc to have a granularity of 16
bytes on most 32-bit platforms.
On Intel platforms, an alignment of 4 bytes is sufficient for normal structures.
Only if certain hardware elements are involved higher alignments are needed. On
some RISC platforms alignment requirements of 8 bytes is not too uncommon.
> So, here's a question: should we put the slab allocator into squid-HEAD
> now?
Naa.. I'd rather get 2.5 in shape first. The step 2.4->2.5 is already huge, and
I am a bit reluctant about adding more changes to 2.5.
-- HenrikReceived on Wed Aug 15 2001 - 18:17:17 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:12 MST