Date: Wed, 11 Nov 1998 07:21:56 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: dg@root.com Cc: tlambert@primenet.com, grog@lemis.com, Reinier.Bezuidenhout@KryptoKom.DE, freebsd-hackers@FreeBSD.ORG Subject: Re: Malloc in the kernel Message-ID: <199811110721.AAA04416@usr01.primenet.com> In-Reply-To: <199811090915.BAA09637@root.com> from "David Greenman" at Nov 9, 98 01:15:16 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >> > In general, the kernel is better at deciding what memory it needs > >> > when it needs it than a kernel code author. You either trust > >> > the locality of reference model upon which VM systems are based, > >> > or you don't. > >> > >> Assuming that fits his needs, what's the answer? > > > >vm_pager_allocate(OBJT_SWAP, 0, OFF_TO_IDX(size), VM_PROT_DEFAULT, 0); > > Bzzt! Wrong! > > ...but you could use kmem_alloc_pageable() (or call vm_map_find() directly) > to allocate demand-zero, pageable, kernel memory. Hmmm.... Better fix /sys/kern/sysv_shm.c then, since that's where I cribbed the code from... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811110721.AAA04416>