panic: kmem_malloc(131072): kmem_map too small (AMD64)
Chuck Swiger
cswiger at mac.com
Thu Sep 27 10:08:45 PDT 2007
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
@@ -289,7 +289,9 @@
.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
...?
--
-Chuck
More information about the freebsd-current
mailing list