From owner-freebsd-hackers Fri Mar 6 17:43:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA28685 for freebsd-hackers-outgoing; Fri, 6 Mar 1998 17:43:38 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA28677 for ; Fri, 6 Mar 1998 17:43:25 -0800 (PST) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id RAA05364; Fri, 6 Mar 1998 17:38:21 -0800 (PST) Message-Id: <199803070138.RAA05364@implode.root.com> To: Terry Lambert cc: semen@iclub.nsu.ru, mike@smith.net.au, freebsd-hackers@FreeBSD.ORG Subject: Re: Are mbufs aligned or bounded on something? In-reply-to: Your message of "Sat, 07 Mar 1998 01:05:15 GMT." <199803070105.SAA25317@usr09.primenet.com> From: David Greenman Reply-To: dg@root.com Date: Fri, 06 Mar 1998 17:38:21 -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> >By the way: if i need aligned memory, should i use contigmalloc(), or >> >better to use malloc, and align block by hands? >> >> All memory returned by malloc() is guaranteed to be power of two aligned >> and won't span a page boundry if <= a page in size; there are many places in >> the kernel that rely on this. >> If you need a large chunk of memory that must be physically contiguous, >> then use contigmalloc(). > >If you need to use contigmalloc(), then you should allocate at boot >time. Yes, I forgot to mention that, thanks. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message