qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c
Date: Sat, 5 Jan 2008 01:07:58 +0000
User-agent: KMail/1.9.7

> On modern operating systems, allocations only return zero when you exhaust
> virtual memory.  Returning nonzero doesn't mean you have enough memory,
> because it's given you a redundant copy on write mapping of the zero page
> and will fault in physical pages when you write to 'em, which has _no_
> return value.  Instead, the out of memory killer will shoot your program in
> the head in the middle of it's run

Decent operating systems allow the system administrator gets to choose how 
optimistic memory allocation is. You're describing wildly-optimistic mode, 
which is often but not always the default.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]