From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 15 11:43:12 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0FB91065670 for ; Thu, 15 Jul 2010 11:43:12 +0000 (UTC) (envelope-from loerner@gmx.de) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id 49D0B8FC14 for ; Thu, 15 Jul 2010 11:43:11 +0000 (UTC) Received: (qmail 4131 invoked by uid 0); 15 Jul 2010 11:16:25 -0000 Received: from 212.185.199.2 by www160.gmx.net with HTTP; Thu, 15 Jul 2010 13:16:22 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Thu, 15 Jul 2010 13:16:22 +0200 From: =?iso-8859-1?Q?=22Marc_L=F6rner=22?= Message-ID: <20100715111622.77770@gmx.net> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Authenticated: #60932973 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX188n1IfHdo8/5wQW34e61kP4jkMewoUD68JXKwmTZ LrvAEVH9X9I7FHDiUch6JGRBP+hI0AcYkTOw== Content-Transfer-Encoding: 8bit X-GMX-UID: MdYIfVMtYmYBd1v0xHQ3pD5CWkZTQdTC X-Mailman-Approved-At: Thu, 15 Jul 2010 11:57:39 +0000 Subject: re: how to do page level mem alloc in freebsd kernel? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 11:43:13 -0000 Hello, what about using contigmalloc(9), there you can specify alignment and boundary. HTH, Marc >Hi, > >I want to allocate one (or more) pages in kernel space. >I'm not sure what is the api in freebsd (something which >is similar to __get_free_pages() of linux). > >Would malloc(4096, ...) guarantee that the returned >address is aligned on page boundary? > >Thanks and regards, >-Kalash -- GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl. Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl