feat(bw): make more RAM available to Lua scripts on some radios (#5717)

This commit is contained in:
philmoz
2024-12-22 12:56:33 +10:00
committed by GitHub
parent e4ba477e34
commit fc642aaf48
3 changed files with 147 additions and 103 deletions
+5
View File
@@ -1881,8 +1881,13 @@ uint32_t availableMemory()
struct mallinfo info = mallinfo();
#if defined(USE_BIN_ALLOCATOR)
extern int bin_avail();
return ((uint32_t)((unsigned char *)&_heap_end - heap)) + info.fordblks + bin_avail();
#else
return ((uint32_t)((unsigned char *)&_heap_end - heap)) + info.fordblks;
#endif
#endif
}
#define FEATURE_ENABLED(f) (g_model.f == OVERRIDE_GLOBAL && g_eeGeneral.f == 0) || (g_model.f == OVERRIDE_ON)