News for hackers. Stuff that matters.
Re:Do not buy RAM, compress by jedbrooke on Friday November 20, 2026 @12:25AM (#50570502)
oh hah, I’m not a security researcher or anything. I was just a high schooler messing around with computers. The rudimentary version I tried was just doing something like this in the python repl

    a = “ha”
    b = 10 * a
    c = 10 * b
and so on and watching the memory climb in the activity viewer. I was surprised when the 10GB or even 100GB one (confirmed with len() ) didnt crash my 8GB laptop or even cause it to swap.

Interestingly I tried the python version just now on modern macos, currently activity monitor shows 192GB ram used, 184GB compressed, on a machine with 36GB physical.

Actually something really weird happened, zsh killed the python proc, activity monitor shows it still alive, but the physical ram value is bugged and showing 0 bytes physical and 1.7 GB swap. So compressing RAM does have some limitations.

There are no comments on this comment yet.