Date: Thu, 10 Jul 1997 12:28:57 +0200 From: Poul-Henning Kamp <phk@dk.tfs.com> To: dg@root.com Cc: Poul-Henning Kamp <phk@dk.tfs.com>, freebsd-bugs@freebsd.org Subject: Re: kern/4070: cannot access over 64MB memory Message-ID: <10300.868530537@critter.dk.tfs.com> In-Reply-To: Your message of "Thu, 10 Jul 1997 02:45:21 PDT." <199707100945.CAA28234@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10300.868530537>