spotify: Tremor (Vorbis) allocations in PSRAM (bell patch 0003)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/external/tremor/os_types.h b/external/tremor/os_types.h
|
||||||
|
index 8d444d6..857f340 100644
|
||||||
|
--- a/external/tremor/os_types.h
|
||||||
|
+++ b/external/tremor/os_types.h
|
||||||
|
@@ -27,10 +27,19 @@
|
||||||
|
|
||||||
|
/* make it easy on the folks that want to compile the libs with a
|
||||||
|
different malloc than stdlib */
|
||||||
|
+#ifdef ESP_PLATFORM
|
||||||
|
+/* decoder state and codebooks in PSRAM: keeps internal RAM free */
|
||||||
|
+#include "esp_heap_caps.h"
|
||||||
|
+#define _ogg_malloc(s) heap_caps_malloc((s), MALLOC_CAP_SPIRAM)
|
||||||
|
+#define _ogg_calloc(n, s) heap_caps_calloc((n), (s), MALLOC_CAP_SPIRAM)
|
||||||
|
+#define _ogg_realloc(p, s) heap_caps_realloc((p), (s), MALLOC_CAP_SPIRAM)
|
||||||
|
+#define _ogg_free free
|
||||||
|
+#else
|
||||||
|
#define _ogg_malloc malloc
|
||||||
|
#define _ogg_calloc calloc
|
||||||
|
#define _ogg_realloc realloc
|
||||||
|
#define _ogg_free free
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
Reference in New Issue
Block a user