Re: know of a memory "eating" utility?
- From: Ignoramus5179 <ignoramus5179@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 13:25:34 -0500
try this program that I just wrote.
#include <stdio.h>
#include <stdlib.h>
int main( int argc, const char * argv[] )
{
if( argc <= 0 ) {
fprintf( stderr, "USAGE: memory.c memlength\n" );
exit( 1 );
}
char * mem = 0;
size_t length = atol( argv[0] );
if( length <= 0 ) {
fprintf( stderr, "invalid length specified" );
exit( 1 );
}
mem = malloc( length );
int i;
/* use memory constantly to avoid being swapped out. Never stop */
while( 1 ) {
for( i = 0; i < length; i += 100 ) {
mem[i] = i % 128;
}
}
}
.
- References:
- know of a memory "eating" utility?
- From: jpchow26
- know of a memory "eating" utility?
- Prev by Date: know of a memory "eating" utility?
- Next by Date: Mail archiving package
- Previous by thread: know of a memory "eating" utility?
- Next by thread: Re: know of a memory "eating" utility?
- Index(es):
Relevant Pages
|