|
|
@@ -11,6 +11,14 @@
|
|
|
#include "luat_log.h"
|
|
|
#include "wm_mem.h"
|
|
|
|
|
|
+
|
|
|
+const uint32_t luat_rom_addr_start = 0x8010000;
|
|
|
+#ifdef AIR103
|
|
|
+const uint32_t luat_rom_addr_end = 0x80FFFFF;
|
|
|
+#else
|
|
|
+const uint32_t luat_rom_addr_end = 0x81FFFFF;
|
|
|
+#endif
|
|
|
+
|
|
|
//------------------------------------------------
|
|
|
// 管理系统内存
|
|
|
|
|
|
@@ -64,7 +72,19 @@ void* __attribute__((section (".ram_run"))) luat_heap_alloc(void *ud, void *ptr,
|
|
|
}
|
|
|
return ptmp;
|
|
|
}
|
|
|
+#if 0
|
|
|
+ uint32_t ptrv = (uint32_t)ptr;
|
|
|
+ if (ptrv != 0) {
|
|
|
+ if (ptrv >= luat_rom_addr_start && ptrv <= luat_rom_addr_end) {
|
|
|
+ // nop 无需释放
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ brel(ptr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#else
|
|
|
brel(ptr);
|
|
|
+#endif
|
|
|
return NULL;
|
|
|
}
|
|
|
|