Re: _alloc_pages: allocation failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Franz" == Franz Reinhardt <fre@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.

~velco

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux