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

Search | Go
Wiki > Main > RockboxArchitecture > RockboxMemoryLayout

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!


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

r16 - 02 Apr 2021 - 20:46:07 - UnknownUser

Copyright © by the contributing authors.