#2,941 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of Memory Systems: Cache, DRAM, Disk

Sentiment score: 1
Reddit mentions: 1

We found 1 Reddit mentions of Memory Systems: Cache, DRAM, Disk. Here are the top ones.

Memory Systems: Cache, DRAM, Disk
Buying options
View on Amazon.com
or
Specs:
Release dateJuly 2010

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 1 comment on Memory Systems: Cache, DRAM, Disk:

u/phao ยท 3 pointsr/learnprogramming

I'm not so sure exactly what you want with your question, so this answer will be broader than it needs to.

First, it's interesting for you to understand that these are implementation aspects. The C language itself doesn't care about the stack or the heap. It talks about storage duration categories like automatic, allocated, static, or thread local. Where these go in real memory is an implementation aspect.

This is an interesting read on the topic: http://ramblings.implicit.net/posts/2014/4/21/there-is-no-stack (btw, the whole blog is very good).

If you want to know more details about the C language, check the ##c irc channel @ irc.freenode.com wiki => http://www.iso-9899.info/wiki/

The description of the storage duration categories are pretty helpful. For example, you should use automatic storage when you want scoping to handle it (it = the duration of the storage for the variable) for you. If you need the storage throughout your program, you can make it static. If you don't know very much about it, but you'll learn more at runtime, consider allocated. I've never used c11 to actually comment on the specifics of thread local. Of course, this is a pretty general broad vague description.

K&R2 has plenty of exercises, many of which involve dealing with memory. It won't be in terms of implementation concepts like stack and heap. It'll be in terms of C's mechanisms for dealing with memory.

With all that out of the way, you can learn about implementation aspects through many different places. And I'm only mentioning this because you said "stack" and "heap", which seems to me is because you have your head around implementation concepts instead of C language semantics.

Anyway, you have options here.

  • An OS book may tell you how an OS might deal with memory management.
  • A computer architecture book might tell you about memory as well. They commonly talk about caches. You'll learn different ways memory can be dealt with (at the computer architecture level) and how that might affect a program's performance.
  • There is a book specifically about all kinds of memory: http://www.amazon.com/Memory-Systems-Cache-DRAM-Disk-ebook/dp/B00BXETR06/
  • A compiler design book (specially an optimizing compiler design book) will talk about code generation and optimization which are relevant for memory access.
  • What Every Programmer Should Know About Memory - http://www.akkadia.org/drepper/cpumemory.pdf
  • Books on C, and also on C++, tend to cover this quite often.
  • Books on program optimization can also cover this.

    Notice that all of these documents talk about more than what you're asking for. I don't know any book and/or document which only talks about what you want. It's also a pretty general topic, because the useful question lurking behind the scenes is how to effectively use memory, which is pretty broad. You can look at:

  • related algorithms;
  • related data structures;
  • relevant implementation aspects;
  • behavior of other systems you're making use of (including libraries and the OS);
  • ... <anything that will help> ...

    And also, "effectively use memory" depends on a criteria: what is it that you consider to be "effectively"?

    In the end, there is a lot to your question.