feat(bw): make more RAM available to Lua scripts on some radios (#5717)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user