Why do computers need RAM memory? And why some programs require lots of it while others require less?

257 views

Just curious about it, but can’t understand why is it like that.

In: 7

15 Answers

Anonymous 0 Comments

Since I’ve seen many answers tackle RAM let me tackle needing more or less. One part comes down to how the problem is framed. Let’s say I ask for the multiples of all numbers between 1 and 16 quintillion. That’s easy you just count from 1, multiply each number by 12 along the way and spit out the answer.
Now I ask, I want the multiples of a *subset* of numbers between 1 and 16 quintillion. Although it’s less numbers that requires memory because I have to know which numbers you want.
I can take another approach and say we’ll just multiply all the numbers and I’ll pick out the ones I wanted from the results. This wastes processor time, but you’re back to not needing RAM. This is an example of the space-time problem. Sometimes you just have sacrifice one or the other for your results, and developers choose one or the other based on the environment they’re working in. I’ve worked with old code that had tricks to deal with low memory situations, if we were doing the same thing today it would be a more straightforward solution since RAM is in abundance compared to decades ago.

You are viewing 1 out of 15 answers, click here to view all answers.