From 14157860b9a95424d8aa16aee7806940e102476a Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 13 Sep 2025 08:41:10 -0400 Subject: [PATCH] rgnano: Shrink CODEC and PLUGIN buffer sizes to reasonable sizes (From 4MB->2MB and 8MB->2MB, respectively) This is a hosted platform with a decent amount of free RAM; however plugins and codecs are dlopen() which doesn't count against those buffers. Furthermore, the rgnano uses musl libc which does NOT implement dlclose() so plugins, codecs, etc stick around in RAM indefinitely even if they are never used again. By shrinking these buffers we free up a bit more headroom for dlopen() to leak, and for the host OS to provide disk caches and whatnot. Change-Id: Ie657bd3b9fc8bd2a1f4bbc07debe3b10538c41c3 --- firmware/export/config/rgnano.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/export/config/rgnano.h b/firmware/export/config/rgnano.h index e2a8ddc824..d5c9727a9f 100644 --- a/firmware/export/config/rgnano.h +++ b/firmware/export/config/rgnano.h @@ -51,10 +51,10 @@ #define CONFIG_RTC APPLICATION /* The number of bytes reserved for loadable codecs */ -#define CODEC_SIZE 0x400000 +#define CODEC_SIZE 0x200000 /* The number of bytes reserved for loadable plugins */ -#define PLUGIN_BUFFER_SIZE 0x800000 +#define PLUGIN_BUFFER_SIZE 0x200000 #define AB_REPEAT_ENABLE