[lkml]   [2000]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Overcomittable memory
Den 16-Mar-00 19:11:24 skrev Andreas Bombe følgende om "Re: Overcomittable memory":
> On Wed, Mar 15, 2000 at 04:00:42PM +0100, Rask Ingemann Lambertsen wrote:
>> Well, guess what, then you won't get any error message, unless you were
>> clever enough to have allocated a string buffer previously.

> Allocated and touched.

No, allocated. I was assuming a system without overcommitment of memory.

> int i;
> char *ptr = malloc(1024);

> if (!ptr) thats_tough();

> for (i = 0; i < 1024; i++) ptr[i] = 0;

> Only then you can be sure that this memory is there, because malloc
> gave you a pointer and the for loop didn't get you killed.

Too bad the OOM killer may kill your program anyway in an OOM situation
to free up memory. So touching every page still doesn't get you anything.
You did manage to kill performance, though. The system will run slower when
touching each and every page becomes a standard measure in glibc, etc.


| Rask Ingemann Lambertsen | E-mail: |
| Please do NOT Cc: to me or the | WWW: |
| mailing list. I am on the list.| "ThrustMe" on XPilot, ARCnet and IRC |
| The impossible is only something that hasn't happened to you yet. |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.108 / U:7.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site