lkml.org 
[lkml]   [1996]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectMemory Swap problem


Your patch made my system behave much better. Here's some test code that
I hacked up to test it.

#include <stdio.h>
#include <malloc.h>

int main(void);
int main()
{
int *p, *q;
size_t len;
size_t i;
len = 13117; /* Not divisible into a page */
for(;;)
{
fprintf(stdout, "Allocation = %u\r", len);
fflush(stdout);
if((p = (int *) malloc(len * sizeof(int))) == NULL)
{
fprintf(stderr, "Memory allocation finally failed at %u words\n",
len);
len = 13117;
continue;
}
q = p;
for(i=0; i<len; i++)
*q++ = i;
free(p);
len += (size_t) ((float)len * 1.3332);
}
return 0;
}

It appears to run "forever" okay. Without your patch, paging was racing
so that I couldn't get any CPU time to stop anything. I have a very
fast SCSI disk used for swap plus an Adaptec AHA-2940 PCI controller.

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.14 on an i586 machine.
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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