Twenty Three Microseconds Gone
Bonwick measured the cost of allocating and freeing one stream head in the SunOS kernel, before and after the slab allocator:
| allocator | construction + destruction | memory allocation | other init | total |
|---|---|---|---|---|
| old | 23.6 us | 9.4 us | 1.9 us | 34.9 us |
| slab | 0.0 us | 3.8 us | 1.9 us | 5.7 us |
Which change accounts for most of the improvement?
Sign in to answer questions and track your progress
Sign In