From owner-freebsd-net Wed Sep 13 20:32: 0 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1D6E837B422 for ; Wed, 13 Sep 2000 20:31:58 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id XAA05166; Wed, 13 Sep 2000 23:31:46 -0400 (EDT) (envelope-from wollman) Date: Wed, 13 Sep 2000 23:31:46 -0400 (EDT) From: Garrett Wollman Message-Id: <200009140331.XAA05166@khavrinen.lcs.mit.edu> To: Bosko Milekic Cc: Garrett Wollman , freebsd-net@FreeBSD.ORG Subject: Re: Clusters larger than PAGE_SIZE and contigmalloc() In-Reply-To: References: <200009140222.WAA04696@khavrinen.lcs.mit.edu> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < 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