memtest86 & memory test

scuba at centroin.com.br scuba at centroin.com.br
Wed Apr 19 15:14:41 UTC 2006


Hi,

	I think memtest86 is the best, but you could use something like 
this bellow. Just adjust the value of N_MEGABYTES, and start as many 
process as you want to full the fisical memory.

[start of code]

#include <stdio.h>
#define N_MEGABYTES 160
#define TOTAL (N_MEGABYTES * 1024 * 1024)
int main(void)
{
        int i;
        char *p;
        char *mem = malloc(TOTAL);

        if ( mem == NULL )
        {
                perror("malloc");
                return 1;
        }

        while ( 1 )
        {
                for (i = 0, p = mem; i < TOTAL; i++, p++)
                {
                        if ( *p == 0 )
                                *p = 1;
                        *p <<= 1;
                }
        }
        return 0;
}           


[end of code]

On Wed, 19 Apr 2006, FreeBSD Daemon wrote:

|Dear list
|
|Is there a memory test suite other them memtest86/memtest86+
|
|TIA
|
|zheyu
|
|_______________________________________________
|freebsd-questions at freebsd.org mailing list
|http://lists.freebsd.org/mailman/listinfo/freebsd-questions
|To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
|


- Marcelo



More information about the freebsd-questions mailing list