Out of memory: system();

Ed K. ed at hp.uab.edu
Sat Jun 12 14:58:27 UTC 2004


On Sat, 12 Jun 2004, Markku Kolkka wrote:
> Ed K. kirjoitti viestissään (lähetysaika lauantai, 12. kesäkuuta
> 2004 02:11):
>> I do have a working test:
>>
>> #include <stdio.h>
>> #include <unistd.h>
>> #include <stdlib.h>
>> #include <errno.h>
>>
>> int main(int argc, char *argv[])
>> {
>>    unsigned char *data;
>>    int i;
>>
>>    data=malloc(500*1024*1024);
>>    memset(data,0,500*1024*1024);
>>
>>    for (i=0; i<100000; i++)
>>      system("cat /proc/meminfo");
>> }
>>
>> This does not cause problems on FC1 (kernel 2.4.22-1.2188) But
>> does on FC2 (kernel 2.6.5-1.358)
>
> I ran this program successfully on FC2 with kernel 2.6.6-1.424,
> 512MB RAM and 1GB swap. No signs of memory leaking.
>
> --
> 	Markku Kolkka
> 	markku.kolkka at iki.fi

Well, I upgraded the computer to kernel 2.6.6-1.427, and the test program works.
but this didn't fix my problem, time to write a new test program....

I'll submit one when its ready.

ed

Security on the internet is impossible without strong, open, 
and unhindered encryption.


More information about the fedora-list mailing list