Re: _alloc_pages: allocation failed
Franz Reinhardt <fre <at> wenglor.de>
2004-06-01 12:57:28 GMT
Am Dienstag, 1. Juni 2004 13:30 schrieb kernelnewbies-bounce <at> nl.linux.org:
> >>>>> "Franz" == Franz Reinhardt <fre <at> wenglor.de> writes:
> Franz> Am Dienstag, 1. Juni 2004 09:12 schrieben Sie:
> >> On Tue, Jun 01, 2004 at 08:16:52 +0200, Franz Reinhardt wrote:
> >> > Hi,
> >> >
> >> > on my linux system, I've got the following message:
> >> > _alloc_pages: 0-order allocation failed. Killing application foo
> >> >
> >> > Can anybody explain me, what's happening ? Is it just a memory leak of
> >> the
> >> > application ? Or has it to do with reusing swapped memory pages ?
> >> It's an out-of-memory kill. You were out of memory. Completely. So the
> >> kernel decided that the only way to get the page was to kill some
> >> process. And did so, using SIGKILL.
> Franz> How can this happen ? I mean, you can't allocate new memory if
> Franz> it's not available, you'll get a NULL-pointer if you try to
> Franz> malloc(). And if you try to access to that memory, the
> Franz> application will end up with an segmentation fault.
> The point is that you haven't got null pointer from malloc, but a
> valid address, in a valid virtual page, it just happens that there's
> no physical page to back up the virtual one. Which happens because
> kernel allocates more virtual pages than physical pages in RAM + swap.