MCPcopy Index your code
hub / github.com/JSorngard/cosmic_ray_detection

github.com/JSorngard/cosmic_ray_detection @v5.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.2.0 ↗ · + Follow
20 symbols 30 edges 3 files 12 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Your computer can double up as a cosmic ray detector. Yes, really!

Cosmic rays hit your computer all the time. If they hit the RAM, this can sometimes cause disturbances, like flipping a random bit in memory. To use your computer as a cosmic ray detector, simply run this program!
The detection works by allocating a vector of zeroed bytes and then checking regularly to see if they are all still zero. Ta-da!

  • Do not run this on a computer with ECC memory, as that will prevent the data corruption we are trying to detect!
  • The chance of detection increases with the physical size of your DRAM modules and the percentage of them you allocate to this program.
  • Beware of operating systems being clever, and e.g. compressing unused memory pages or swapping them to disk. A vector of nothing but zeros that hasn't been used in a while is an excellent target for this. This will shrink your detector!
  • Expect detections to be very rare.

It may also not work on DDR5 memory modules and later as those contain onboard ECC.

Special thanks to * /u/csdt0 and /u/HeroicKatora on reddit for ideas about how to improve the correctness of the program and avoid the pitfalls of virtual memory.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Core symbols most depended-on inside this repo

parse_si_prefix
called by 2
src/config.rs
write
called by 2
src/detector.rs
position_and_value_of_changed_element
called by 2
src/detector.rs
get
called by 2
src/detector.rs
len
called by 1
src/detector.rs
is_intact
called by 1
src/detector.rs
position_of_changed_element
called by 1
src/detector.rs
reset
called by 1
src/detector.rs

Shape

Method 11
Function 6
Class 2
Enum 1

Languages

Rust100%

Modules by API surface

src/detector.rs12 symbols
src/config.rs7 symbols
src/main.rs1 symbols

For agents

$ claude mcp add cosmic_ray_detection \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page