Subject: Re: "panic malloc: out of space in kmem_map" on mac68k
To: None <current-users@NetBSD.ORG>
From: Ken Nakata <>
List: port-m68k
Date: 05/07/1998 11:00:27
On Wed, 06 May 1998 10:05:31 +1000,
Simon Burge <> wrote:
> On Tue, 05 May 1998 21:31:29 +0900  Ken Nakata wrote:
> > I've built a mac68k kernel with the newly integrated UVM code (kudos
> > to those who worked hard to get it working!).  It booted fine but when
> > I tried to run Mew (an Emacs-based mail user agent), I got a panic:
> > panic malloc: out of space in kmem_map
> Try increasing NKMEMCLUSTERS.  I think the default value on the 68k
> platforms is 1024 - try 2048 perhaps.  Note that the kmem_map errors do
> not seem to be related to UVM - at least I got the same panic on a pmax
> without UVM that was fixed by increasing NKMEMCLUSTERS.

It turns out that I still get the same panic even though I increased
NKMEMCLUSTERS to 2048...  It's pretty reproducible.  It seems to occur
whenever Emacs 20.2 tries to exec something.  The strange thing is I
*can* run that thing from shell with no problem.  Is there anything
peculiar about the way Emacs exec()s?  This is on 1.3E supped on May
6th.  Emacs is 20.2 built right out of the box from the pkgsrc.

Anyway, the stack trace shows that, when the fork()ed Emacs process
tries to exec(), a page fault occurs within(?) _sys_execve(), and
_malloc() fails to allocate memory.

I'm out of clue...  Is there anything I should be looking into?