Subject: Re: USB CF reader problems with 2.0beta
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-i386
Date: 05/05/2004 18:17:37
Manuel Bouyer wrote:

> Maybe a program doing a large malloc(), touching every page and exiting
> would be enouth. But I never tried this trick.

I use this on my laptop with 384MB of RAM:

	#include <stdlib.h>

	#define SIZE    224 * 1024 * 1024

	main()
	{
		char *foo;
		int i, pgsize;

		pgsize = getpagesize();
		foo = malloc(SIZE);
		for (i = 0; i < SIZE; i += pgsize)
			foo[i] = 1;
		exit(0);
	}

This didn't work reliably trying to touch 128MB of RAM.  Note that you
may need to set your data size limit up to run with sizes this large.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/