Hardware Reference
In-Depth Information
Chapter 4
SDRAM
The Model B Rev 2.0 Raspberry Pi has 512 MB of SDRAM, while the older revisions and
remaining models have 256 MB. Contrast this to the AVR class ATmega168p, which has
1 KB of static RAM. SDRAM is synchronous dynamic random access memory , which
synchronizes with the system bus for improved performance. It uses a form of pipelining
to gain this advantage.
There isn't much about the memory hardware that concerns the average Pi
developer. However, in this chapter, you'll examine some useful Raspbian Linux kernel
interfaces that inform us how that memory is utilized. You'll also examine how to access
the memory-mapped ARM peripherals directly from your Linux application.
/proc/meminfo
The pseudo file /proc/meminfo provides us with information about memory utilization.
This information varies somewhat by architecture and the compile options used for that
kernel. Let's study an example that is produced by Raspbian Linux, on the Raspberry Pi:
$ cat /proc/meminfo
MemTotal: 448996 kB
MemFree: 340228 kB
Buffers: 14408 kB
Cached: 58532 kB
SwapCached: 0 kB
Active: 45948 kB
Inactive: 51564 kB
Active(anon): 24680 kB
Inactive(anon): 820 kB
Active(file): 21268 kB
Inactive(file): 50744 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 102396 kB
SwapFree: 102396 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 24584 kB
 
Search WWH ::




Custom Search