Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 1998 13:46:34 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Terry Lambert <tlambert@primenet.com>, Reinier Bezuidenhout <Reinier.Bezuidenhout@KryptoKom.DE>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Malloc in the kernel
Message-ID:  <19981105134634.N784@freebie.lemis.com>
In-Reply-To: <199811041835.LAA09570@usr07.primenet.com>; from Terry Lambert on Wed, Nov 04, 1998 at 06:35:12PM %2B0000
References:  <199811041747.SAA05132@borg.kryptokom.de> <199811041835.LAA09570@usr07.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday,  4 November 1998 at 18:35:12 +0000, Terry Lambert wrote:
>> If I want to malloc really large space in the kernel, say from
>> 2k up to 1M or maybe more .... wat parameter should 'n
>> give to malloc ??
>>
>>  malloc(1000, ????, M_WAITOK);
>>
>> ? M_DEVBUF
>>
>> if it is possible :)
>
> It depends on what you intend to use the memory for.
>
> Ideally, you would be prepared to take a page fault, and would
> allocate pageable memory backed by swap so that you didn't
> exhaust the physical memory in the system.
>
> 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?

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

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?19981105134634.N784>