From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 08:38:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D949C16A417 for ; Fri, 15 Dec 2006 08:38:26 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B9C843CF5 for ; Fri, 15 Dec 2006 08:36:01 +0000 (GMT) (envelope-from marc.loerner@hob.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.hob.de (Postfix) with ESMTP id DE5EF27757 for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from mailgate.hob.de ([127.0.0.1]) by localhost (mailgate.hob.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27601-07 for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id 4232D2778B for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id EEE842FC3 for ; Fri, 15 Dec 2006 09:37:37 +0100 (CET) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 09:37:37 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200612150937.37737.marc.loerner@hob.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at hob.de Subject: Allocate aligned memory 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: Fri, 15 Dec 2006 08:38:26 -0000 Hello all, I want to allocate 120KB of memory thats aligned to 32KB. I already saw/found the function contigmalloc, now my question is, why following functioncall never does return with an resulting address, instead null is returned? unsigned long *p = (unsigned long*) contigmalloc(120*1024, M_DEVBUF, M_WAITOK, 0, (1<<22), 32*1024, 1024*1024); Thanks in advance, Marc P.S.: I'm already aware that contigmalloc doesn't support M_WAITOK!