From owner-freebsd-hackers Wed Feb 5 19:54:47 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02794 for hackers-outgoing; Wed, 5 Feb 1997 19:54:47 -0800 (PST) Received: from sendero.i-connect.net ([206.190.144.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA02789; Wed, 5 Feb 1997 19:54:42 -0800 (PST) Received: (from shimon@localhost) by sendero.i-connect.net (8.8.5/8.8.4) id UAA06804; Wed, 5 Feb 1997 20:53:54 -0800 (PST) Message-ID: X-Mailer: XFMail 1.1-alpha [p0] on FreeBSD Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 05 Feb 1997 19:33:54 -0800 (PST) Organization: iConnect Corp. From: Simon Shapiro To: freebsd-scsi@freebsd.org, freebsd-hackers@freebsd.org Subject: Contigious (spelling?) allocation in kernel Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I need to allocate a contigious (one piece :-) block of memory for a DMA scatter/gather list. The HBA knows how to do scatter gather, but wants a single pointer to a single block of memory that hoslds the entire list. The SG structure is very plain, 32bits for length and 32bits for physical address; 8 bytes. The thing is capable of up to 8192 entries, which give us a possible list of 64KB per request list. As each HBA can have up to 256 concurrent requests, with who knows how many more in the driver's queue, the list can grow quite impressively. Since most requests are smaller, it seems very wasteful to allocate all this memory upfront. So malloc is in order, but what are the options? Thanx, Simon