lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Commenting out out_of_memory() function in __alloc_pages()
Date
The funniest part is that with memset commented out_of_memory observed,
contrary to my expectation.

I don't know why. It shouldn't have. I am running the application on an ARM
target.

Regards,
Abu.

-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Friday, July 07, 2006 3:25 PM
To: Abu M. Muttalib
Cc: kernelnewbies@nl.linux.org; linux-newbie@vger.kernel.org;
linux-kernel@vger.kernel.org; linux-mm
Subject: Re: Commenting out out_of_memory() function in __alloc_pages()


I am not sure about x86, but on ia64, you would be very hard pressed
for this application to actually run you out of memory. With the
memset commented out, you would be allocating vmas, etc, but you
would not be actually putting pages behind those virtual addresses.

Thanks,
Robin

--------------------------- test1.c ----------------------------------

#include<stdio.h>
#include<string.h>

main()
{
char* buff;
int count;

count=0;
while(1)
{
printf("\nOOM Test: Counter = %d", count);
buff = (char*) malloc(1024);
// memset(buff,'\0',1024);
count++;

if (buff==NULL)
{
printf("\nOOM Test: Memory allocation error");
}
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 16:55    [W:0.070 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site