spacether / cosmicraydetector

A Go program to detect bit flips caused by cosmic rays
MIT License
4 stars 0 forks source link

Only virtual memory allocated #5

Open Kicer86 opened 3 years ago

Kicer86 commented 3 years ago

On Linux, current implementation allocates virtual memory only. As a result only a small fraction of desired block is actually being scanned.

As long as allocated memory is not being written, Linux won't assign physical RAM to it.

spacether commented 3 years ago

Hmm maybe that is happening on windows and is why I never saw any rays when I ran it for a couple of weeks. Any ideas on how to force allocation of physical memory?

spacether commented 3 years ago

In getMemoryBlock should I write to the memory once?

Kicer86 commented 2 years ago

There may be a way of forcing physical memory allocation during getMemoryBlock call (I do not know golang, so cannot help with that), but the simple solution would be to write to the allocated memory at least once.