On Sep 26, 2007, at 11:00 PM, Dag-Erling Smørgrav wrote: > Chuck Swiger <cswiger_at_mac.com> writes: >> I'm not certain whether FreeBSD's kernel memory allocator [malloc(9), >> zone(9)] even supports the notion of allocating pageable memory >> rather than memory taken from the fixed KVA region. The manpage >> implies that calling kernel malloc with M_WAITOK will always return a >> valid pointer and not NULL, but I'm not convinced this is will be >> true if you try allocating something larger than the size of KVA and/ >> or the amount of physical RAM available in the system. > > malloc(M_WAITOK) will panic if the request is not satisfiable. > Where do > you think "kmem_map too small" comes from? Indeed-- an excellent point that would be nifty to find in the docs: --- src/share/man/man9/malloc.9~ 2005-02-22 12:20:20.000000000 -0500 +++ src/share/man/man9/malloc.9 2007-09-27 13:00:36.000000000 -0400 _at__at_ -289,7 +289,9 _at__at_ .Dv NULL if the request could not be satisfied (implying that .Dv M_NOWAIT -was set). +was set). However, if +.Dv M_WAITOK +is set and the request could not be satisfied, the kernel will panic. .Sh DIAGNOSTICS A kernel compiled with the .Dv INVARIANTS ...? -- -ChuckReceived on Thu Sep 27 2007 - 15:08:45 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:18 UTC