gotchaMinor
Difference between RAM and buffer
Viewed 0 times
anddifferencebetweenrambuffer
Problem
I have searched but didn't get any exact difference between RAM and a buffer. If both are used for temporary storage, then why they are named differently while both having same property?
Solution
Buffer is a concept. It's a structure used to hold data to keep it "closer" while you're processing it. Like buffering a YouTube video. Many types of memories are used as buffers. RAM is certainly great for holding buffers, but for large data you can also buffer data on a hard drive, or an SSD.
Buffers are mainly used to hold data that is costly to read and write (costly in terms of time, or bandwidth, etc), so you'd rather only read a chunk of it once, work on it, then write it back when you're done. And RAM is a good place to do that, unless your data is huge. As you know, current RAM goes from the hundreds of MiB (smartphones) to dozens of GiB (high end PC).
RAM is the specific type of memory. Lots of software uses it to hold buffers, but also to hold its own code, etc.
Buffers are mainly used to hold data that is costly to read and write (costly in terms of time, or bandwidth, etc), so you'd rather only read a chunk of it once, work on it, then write it back when you're done. And RAM is a good place to do that, unless your data is huge. As you know, current RAM goes from the hundreds of MiB (smartphones) to dozens of GiB (high end PC).
RAM is the specific type of memory. Lots of software uses it to hold buffers, but also to hold its own code, etc.
Context
StackExchange Computer Science Q#106634, answer score: 3
Revisions (0)
No revisions yet.