dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Wiki > Main > RockboxMemoryLayout (compare)

Difference: RockboxMemoryLayout (r13 vs. r12)

Rockbox Memory Layout

See also PluginMemoryLayout

This information is currently being gathered, and is certainly incomplete, if not incorrect. Please add further details and correct mistakes!


UsageStart pointerSize
dircache font buffer audiobuf mbuf (initially) varies MAX_FONT_SIZE
DataBase dircache audiobuf (initially) varies
DataBase search instructions   varies
playlist storage DataBase search instructions   configurable varies
tree playlist storage   configurable
LastFMLog tree storage cache scrobbler_cache SCROBBLER_MAX_CACHE configurable * SCROBBLER_CACHE_LEN (optional)
Cuesheet buffer LastFMLog cache scrobbler_cache 2 SCROBBLER_MAX_CACHE * sizeof(struct SCROBBLER_CACHE_LEN cuesheet) (optional)
voice Cuesheet thumbnail buffer (.talk clips)   MAX_THUMBNAIL_BUFSIZE 2 * sizeof(struct cuesheet) (optional)
voice file thumbnail buffer (.talk clips) audiobuf (after initialisation complete) talk_get_bufsize() MAX_THUMBNAIL_BUFSIZE
codec malloc voice file buffer &audiobuf[talk_get_bufsize()] audiobuf (after initialisation complete) MALLOC_BUFSIZE talk_get_bufsize()
compressed codec data (+ malloc buffer guard buffer) filebuf &audiobuf[talk_get_bufsize()] = &audiobuf[talk_get_bufsize()+MALLOC_BUFSIZE] as MALLOC_BUFSIZE big as possible
audio compressed codec IRAM data (+ guard buffer) filebuf + filebuflen = &audiobuf[talk_get_bufsize()+MALLOC_BUFSIZE] CODEC_IRAM_SIZE as big as possible
voice audio codec IRAM filebuf + filebuflen CODEC_IRAM_SIZE (if talk_voice_required())
voice codec DRAM IRAM   CODEC_SIZE CODEC_IRAM_SIZE (if talk_voice_required())
voice codec DRAM   CODEC_SIZE (if talk_voice_required())
PCM buffers/descriptors voice codec DRAM audiobufend - (pcmbuf_size + pcmbufdesc_size + PCMBUF_MIX_CHUNK*2) pcmbuf_size + pcmbufdesc_size CODEC_SIZE (if talk_voice_required())
PCM crossfade buffers/descriptors buffer audiobufend - PCMBUF_MIX_CHUNK*2 (pcmbuf_size + pcmbufdesc_size + PCMBUF_MIX_CHUNK*2) PCMBUF_MIX_CHUNK pcmbuf_size + pcmbufdesc_size
PCM voice crossfade mix buffer audiobufend - PCMBUF_MIX_CHUNK PCMBUF_MIX_CHUNK*2 PCMBUF_MIX_CHUNK
(end) PCM voice mix buffer audiobufend - PCMBUF_MIX_CHUNK PCMBUF_MIX_CHUNK
(end) audiobufend  


  • The allocations for dircache through to codec malloc buffer are all allocated during initialisation using buffer_alloc, hence changing the value of audiobuf.
  • In pcmbuf_init, the comment shows layout ...CODECBUFFER|---------PCMBUF---------|GUARDBUF|DESCS| - is this a seperate guard buffer, or a mistake?


(to be added)

r15 - 06 Oct 2008 - 16:37:41 - MarcoenHirschberg

Revision r13 - 13 Apr 2007 - 15:13 - MarcoenHirschberg
Revision r12 - 13 Apr 2007 - 14:35 - SamuelKatz
Copyright by the contributing authors.