Re: Please don't beat me up (was Re: Bugs and wishes in memory management area)

Daniel Barlow (dan@detached.demon.co.uk)
Sun, 1 Dec 1996 15:20:37 GMT


In article <Pine.LNX.3.91.961129202137.142A-100000@nextd.demon.co.uk>,
Mark Hemment <markhe@nextd.demon.co.uk> wrote:
>behaviour. If you know the usage patterns, it is possible to design
>efficient allocators for specific applications. Difficult to do in a
>kernel.

Am I missing something here? A couple of printk()s in kmalloc and
kfree() will show you the usage patterns quite clearly, and a lot of
them _are_ regular.

I haven't messed with this since 1.3.70 or so, but at that time the n
most common request sizes were 56, 84,516, 988, 16 and 1060. 56 bytes
accounted for around 80% of the requests. Try it!

By the way, 56 is (or was, anyway) sizeof (vm_area_struct). These
figures were produced on a standalone box; obviously networking makes
a difference

-dan