Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Mar 1998 22:54:13 -0800
From:      David Greenman <dg@root.com>
To:        Ustimenko Semen <semen@iclub.nsu.ru>
Cc:        Mike Smith <mike@smith.net.au>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Are mbufs aligned or bounded on something? 
Message-ID:  <199803060654.WAA24313@implode.root.com>
In-Reply-To: Your message of "Fri, 06 Mar 1998 10:37:28 %2B0600." <Pine.BSF.3.96.980306102709.4977A-100000@iclub.nsu.ru> 

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().

-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?199803060654.WAA24313>