hosted: Shrink audiobuffer to (MEMORY_SIZE-1) megabytes

This represents a 256K increase from the former (MEMORYSIZE-0.75), and
is necessary due to the growth in our binary sizes over the past decade
or so.

It is debatable if this is enough given that our actual memory
usage is approximately (MEMORYSIZE+3) megabytes (plus runtime OS
overhead) for the typical hosted build, but giving the host OS a bit
more breathing room is warranted.

Change-Id: I53e044585a32efd50a85e68d64fd21921eda01a3
This commit is contained in:
Solomon Peachy 2025-09-12 23:00:14 -04:00
parent 161f8c0e24
commit 32d52e0415
2 changed files with 4 additions and 4 deletions

View file

@ -30,9 +30,8 @@ extern unsigned char audiobufend[];
#endif
#else /* PLATFORM_HOSTED */
static unsigned char audiobuffer[((MEMORYSIZE)*1024-768)*1024];
static unsigned char audiobuffer[(MEMORYSIZE-1)*1024*1024];
unsigned char *audiobufend = audiobuffer + sizeof(audiobuffer);
extern unsigned char *audiobufend;
#endif
#ifdef BUFLIB_DEBUG_PRINT

5
tools/configure vendored
View file

@ -1816,8 +1816,9 @@ fi
# modelname: short model name used all over to identify this target
# memory: number of megabytes of RAM this target has. If the amount can
# be selected by the size prompt, let memory be unset here
# Note that for hsoted/application builds, this is the size
# reserved for the audio buffer, not the total RAM size.
# Note for hosted/application builds, (memory-1) defines the
# audiobuffer size; actual memory usage will likely be
# larger and is found in rockbox-info.txt after compilation.
# target: -Ddefine passed to the build commands to make the correct
# config-*.h file get included etc
# tool: the tool that takes a plain binary and converts that into a