From owner-freebsd-scsi Tue Dec 10 18:12:25 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FA1B37B401 for ; Tue, 10 Dec 2002 18:12:24 -0800 (PST) Received: from msgbas1x.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id C044443EC2 for ; Tue, 10 Dec 2002 18:12:23 -0800 (PST) (envelope-from yiding_wang@agilent.com) Received: from relcos2.cos.agilent.com (relcos2.cos.agilent.com [130.29.152.237]) by msgbas1x.cos.agilent.com (Postfix) with ESMTP id 6C724ED23 for ; Tue, 10 Dec 2002 19:12:18 -0700 (MST) Received: from axcsbh2.cos.agilent.com (axcsbh2.cos.agilent.com [130.29.152.144]) by relcos2.cos.agilent.com (Postfix) with SMTP id 2C90B18 for ; Tue, 10 Dec 2002 19:12:18 -0700 (MST) Received: from 130.29.152.144 by axcsbh2.cos.agilent.com (InterScan E-Mail VirusWall NT); Tue, 10 Dec 2002 19:12:17 -0700 Received: by axcsbh2.cos.agilent.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Dec 2002 19:12:17 -0700 Message-ID: <334DD5C2ADAB9245B60F213F49C5EBCD05D54F20@axcs03.cos.agilent.com> From: yiding_wang@agilent.com To: freebsd-scsi@freebsd.org Subject: Question on memory allocation Date: Tue, 10 Dec 2002 19:12:16 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello Team, I have some questions about memory allocation in FreeBSD device driver. I couldn't find answer either from man page or docs. 1, For the function malloc(), what does M_DEVBUF flag represent? 2, What is the syntax and argument for malloc() to allocate N byte of memory with M alignment requirement? 3, Can malloc be used for physical contiguous memory allocation? If so, what is the syntax and argument? 4, If bus_dmamem_alloc() is the one for physical contiguous memory allocation, then what is the syntax and argument? for getting alig 5, Is there any memory size limitation from both memory allocation function? Any direction to source documents regarding these memory allocation function and vtop / ptov function pair are welcomes! Many thanks! Eddie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message