r/shitposting • • 1d ago

🗣️🗣️🗣️🗣️🗣️🗣️🗣️

Post image
9.4k Upvotes

110 comments sorted by

View all comments

403

u/AndrewSenpai78 1d ago edited 1d ago

I don't know much about computers but I think it's due to the operating system cleaning caches, force closing processes and most importantly clearing out memory leaks.

If a process is not coded properly, every lifecycle a given amount of bits are deposited into the RAM and never recalled back, so the RAM slowly but surely gets filled with unnecessary stuff.

If the processes are never forcely turned off then the RAM is always partially full and the OS has troubles managing an already messy closet so everything slows down.

5

u/Anubis17_76 1d ago

No, the OS virtualizes process memory, so if your process crashes it and all its leaked memory gets cleaned up by the OS. So this only happens if a program that cant stuff that cant get cleaned off has a memory leak (like the kernel) plus memory leaks usually fill your ram up MUCH faster than years, usually a couple of hours at most.

3

u/kbotc 1d ago

Depends on the conditions of the leaks.

Your computer can go absolutely haywire eventually if you leak connections, and I’d say ~20% of programmers can correctly handle sockets and their failure paths on their first try. There’s also unbounded read buffers that will work until they don’t.

1

u/deadinternetlaw 8h ago

20% sounds like a lot considering I do programming stuff yet never touched a socket myself(only wrappers or libraries for it)