Hi,
just run this and a top in a different terminal. If the memory use of the
process goes down after the
"freeing..." message, all is fine.
It works as expected on Mac OS X Leopard and NetBSD 3.1
You might set your limits to unlimited before running this.
Dave
-------------------------------------
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define MALLOCSIZE 1048576*512
int main()
{
void * ptr = NULL;
int dummy = 0xdeadbeef;
int i;
printf("Hello World\n");
ptr = malloc(MALLOCSIZE);
for (i=0;i< MALLOCSIZE;)
{
memcpy(ptr+i, &dummy, sizeof(int));
i+= sizeof(int);
}
printf("Sleeping for 30 sec\n");
sleep(30);
printf("freeing...\n");
free(ptr);
printf("Sleeping for 30 sec\n");
sleep(30);
printf("bye\n");
return 0;
}
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev