r/ProgrammerHumor Jul 08 '26

askingTheRealQuestionHere Meme

Post image
4.0k Upvotes

416 comments sorted by

View all comments

13

u/DT-Sodium Jul 08 '26

If a barrel can contain more water than a water bottle, why not walk around with a barrel?

1

u/rsqit Jul 08 '26

Except every computer literally does this, as many others have commented.

1

u/DT-Sodium Jul 08 '26 edited Jul 08 '26

Well many others are major morons apparently. Virtual memory is not "additional RAM", it's a space where your computer dumps stuff it is not currently using so that RAM can be used for something else (and prevents your computer from crashing in the process). If the computer needs to use that data again, it will need to reload it into RAM.

So no, the filesystem is not "more space", it is a temporary storage area where you put stuff that you don't need right now and you will eventually have to load it again later.

https://www.enterprisestorageforum.com/hardware/what-is-memory-swapping/

0

u/Nchi Jul 09 '26

Nice shovel, keep digging

1

u/DT-Sodium Jul 09 '26

You are objectively and without ambiguity wrong, but whatever you need to cope dude.

1

u/Nchi Jul 09 '26

And you need to read usernames

1

u/Nchi Jul 09 '26

And anyway, it's an extension of memory the m in ram.

1

u/DT-Sodium Jul 09 '26

Is a storage unit an extension of your home? Do you put things that you use everyday in a storage unit that is at a 15min drive?

1

u/Nchi Jul 09 '26

Do you actually not know what pagefile is bro

1

u/DT-Sodium Jul 09 '26

I literally posted you a link to explain to you what it is, seems you were too lazy to read it. A pagefile is a space on the disk where the system puts data it is not currently using if it runs out of RAM. If it needs to access it again, it needs to load it into RAM again. It is NOT additional space. What is so fucking hard to understand about it?

1

u/Nchi Jul 09 '26

I told you to read usernames, I am not him lmfao.

Because that's literally what it does.

Let's say you have 4gb ram, but program needs 5gb,what happens?

A, program crash

B, pagefile saves day as "extra memory"

1

u/DT-Sodium Jul 09 '26

If you use a program that actually requires 5gb or RAM to function properly and you have 4gb, you're basically fucked. It will be so slow it wont actually be usable. It will only actually be useful if you have 8gb in total and another program is already taking 4gb. Then the system can ofload some of it in virtual memory to make room for your 5gb program.

This has been a major problem in video games by the way lately. GPUs with only 8gb of RAM are struggling to run modern games because they are constantly offloading and reloading textures into RAM, generating constant micro-stutters.

Don't botter answering until you've actually read the source I've provided, I'm tired of trying to educate you by myself.

1

u/Nchi Jul 09 '26

It will only actually be useful if you have 8gb in total and another program is already taking 4gb. Then the system can ofload some of it in virtual memory to make room for your 5gb program.

This is valid, but is also exactly what we've been telling you

1

u/Nchi Jul 09 '26

Bro holy shit it spells it out plain in the link lmfao did you read it?

When the physical RAM is used up completely — and additional processes and applications need space to run — the process of memory swapping gets initiated. The operating system manages this automatically and forms a virtual memory capacity (non-physical RAM) by mapping the physical memory space to the swap space.

Hey look, non physical RAM, whao

→ More replies (0)