Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 23:31:46 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Bosko Milekic <bmilekic@dsuper.net>
Cc:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, freebsd-net@FreeBSD.ORG
Subject:   Re: Clusters larger than PAGE_SIZE and contigmalloc()
Message-ID:  <200009140331.XAA05166@khavrinen.lcs.mit.edu>
In-Reply-To: <Pine.BSF.4.21.0009132234580.397-100000@jehovah.technokratis.com>
References:  <200009140222.WAA04696@khavrinen.lcs.mit.edu> <Pine.BSF.4.21.0009132234580.397-100000@jehovah.technokratis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 13 Sep 2000 23:03:02 -0400 (EDT), Bosko Milekic <bmilekic@dsuper.net> said:

>Assuming we're dealing with a general purpose allocator, such as the
>kernel's malloc(), then I can see how this _may_ be profitable. However,
>if we're just allocating same-sized objects (or some small limited number
>of various sized objects), then wouldn't this just fragment the space?
>(i.e. 1536 < PAGE_SIZE and also not a power of 2).

1536 is exactly 1.5 kbytes, so three pages fit eight of them as I
mentioned before.  You don't want to use a general-purpose allocator
for locality and efficiency reasons.  Of course, the trick is that
they have to be physically contiguous if you want to pack them that
way.  (However, finding three physically-contiguous pages is
potentially much easier than finding 16 physically-contiguous pages.)

Putting the headers in the same block of memory is probably more
practical today.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009140331.XAA05166>