Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Mar 1998 17:38:21 -0800
From:      David Greenman <dg@root.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        semen@iclub.nsu.ru, mike@smith.net.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Are mbufs aligned or bounded on something? 
Message-ID:  <199803070138.RAA05364@implode.root.com>
In-Reply-To: Your message of "Sat, 07 Mar 1998 01:05:15 GMT." <199803070105.SAA25317@usr09.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> >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



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