From owner-freebsd-bugs Thu Jul 10 03:31:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA24392 for bugs-outgoing; Thu, 10 Jul 1997 03:31:01 -0700 (PDT) Received: from critter.dk.tfs.com ([140.145.230.252]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA24354 for ; Thu, 10 Jul 1997 03:30:54 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id MAA10302; Thu, 10 Jul 1997 12:28:58 +0200 (CEST) To: dg@root.com cc: Poul-Henning Kamp , freebsd-bugs@freebsd.org From: Poul-Henning Kamp Subject: Re: kern/4070: cannot access over 64MB memory In-reply-to: Your message of "Thu, 10 Jul 1997 02:45:21 PDT." <199707100945.CAA28234@implode.root.com> Date: Thu, 10 Jul 1997 12:28:57 +0200 Message-ID: <10300.868530537@critter.dk.tfs.com> Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199707100945.CAA28234@implode.root.com>, David Greenman writes: > Nonetheless, the problem is that he's hitting the process ulimit. As you >know, the failure mode for running out of memory (RAM + swap) is quite >different than the error indicated in this problem report. Perhaps the problem >is caused by VM fragmentation? Or a bug in malloc? It seems to me that phkmalloc does the logical (and correct!) thing: schizo phk> limits Resource limits (current): cputime infinity secs filesize infinity kb datasize-cur 65536 kb stacksize-cur 8192 kb coredumpsize infinity kb memoryuse-cur 29460 kb memorylocked-cur 9821 kb maxprocesses 1620 openfiles 3240 schizo phk> cat a.c main() { malloc(64*1024*1024); } schizo phk> cc a.c schizo phk> ktrace ./a.out schizo phk> kdump | tail -5 6761 a.out CALL break(0x4000) 6761 a.out RET break 0 6761 a.out CALL break(0x4004000) 6761 a.out RET break -1 errno 12 Cannot allocate memory 6761 a.out CALL exit(0) schizo phk> limit datasize unlimited schizo phk> limits Resource limits (current): cputime infinity secs filesize infinity kb datasize 131072 kb stacksize-cur 8192 kb coredumpsize infinity kb memoryuse-cur 29460 kb memorylocked-cur 9821 kb maxprocesses 1620 openfiles 3240 schizo phk> ktrace ./a.out schizo phk> kdump | tail -5 6767 a.out CALL mmap(0,0x12000,0x3,0x1002,0xffffffff,0,0,0) 6767 a.out RET mmap 134836224/0x8097000 6767 a.out CALL munmap(0x801c000,0x1000) 6767 a.out RET munmap 0 6767 a.out CALL exit(0x4000) schizo phk> kdump | grep sbrk schizo phk> kdump | grep break 6767 a.out CALL break(0x4000) 6767 a.out RET break 0 6767 a.out CALL break(0x4004000) 6767 a.out RET break 0 -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.