From owner-freebsd-hackers Sun Sep 20 12:29:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA20893 for freebsd-hackers-outgoing; Sun, 20 Sep 1998 12:29:58 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA20850 for ; Sun, 20 Sep 1998 12:29:51 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id VAA02257; Sun, 20 Sep 1998 21:29:11 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id VAA00976; Sun, 20 Sep 1998 21:29:10 +0200 (MET DST) Message-ID: <19980920212910.21253@follo.net> Date: Sun, 20 Sep 1998 21:29:10 +0200 From: Eivind Eklund To: Bill Paul , hackers@FreeBSD.ORG Subject: Re: malloc()ing 64K physically contiguous buffer in kernel References: <199809201745.NAA21711@skynet.ctr.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199809201745.NAA21711@skynet.ctr.columbia.edu>; from Bill Paul on Sun, Sep 20, 1998 at 01:45:24PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Sep 20, 1998 at 01:45:24PM -0400, Bill Paul wrote: > So: is there some way to allocate 64K of contiguous memory? Or even > 8/16/32K? As long as I can hit one of the allowed buffer sizes I'll > be happy, although I wanted 64K in order to reduce the likelyhood of > receiver overruns. contigmalloc(). The function itself is in src/sys/vm/vm_page.c Prototype is in src/sys/sys/malloc.h and src/sys/vm/vm_kern.h (I have no idea why it is both places). Examples of use in src/sys/dev/dpt/dpt_scsi.c src/sys/i386/i386/busdma_machdep.c src/sys/i386/isa/bs/bsif.c src/sys/i386/isa/sound/soundcard.c src/sys/i386/isa/gsc.c src/sys/i386/isa/if_sr.c src/sys/i386/isa/asc.c src/sys/i386/isa/isa.c src/sys/i386/isa/snd/dmabuf.c src/sys/kern/uipc_mbuf.c src/sys/pc98/pc98/pc98.c No man page, and no reference in malloc(9) :-( Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message