Re: writing data

new topic     » goto parent     » topic index » view thread      » older message » newer message

Irv Mullins wrote:
> I hope someone on this list will know of a good
> (DOS based) memory checker program. I cured my
> problems by swapping memory chips - er...modules,
> whatever, until things worked. It would be nice to be
> able to check to be sure I stomped that bug....

A couple of years ago I was plagued by an intermittent
memory failure. I used the program below to prove to myself
that I had a hardware problem, before I demanded the computer
retailer to replace all of my memory chips. It just copies sequence
x to sequence y and then checks if there are any differences.
I found a single-bit error every 10 minutes or so on my machine
back then. I'm sure there are much better programs for this
sort of thing, but this might help. Set the SIZE according to
how much memory you have.

-- test for flaky memory
constant SIZE = 500000
sequence x, y
integer pattern

while 1 do
    for j = 1 to 1000 do
        pattern = rand(1000000000)
        x = repeat(pattern, SIZE)
        y = x                -- y and x simply point to the same thing
        y[1] = pattern  -- force Euphoria to actually make a copy
        for i = 1 to SIZE do
            if compare(x[i], pattern) or compare(y[i], pattern) then
                puts(1, "memory failure!\n")
                ?pattern
                ?x[i]
                ?y[i]
                ?i
                abort(1)
            end if
        end for
        if get_key() != -1 then
            abort(0)
        end if
        puts(1, '.')
    end for
end while


Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu