Dozingfiretruck 2 лет назад
Родитель
Сommit
39eb74236d
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      app/port/luat_malloc_air101.c

+ 4 - 4
app/port/luat_malloc_air101.c

@@ -129,21 +129,21 @@ void* luat_heap_calloc(size_t count, size_t _size) {
 }
 }
 #else
 #else
 void* luat_heap_malloc(size_t len) {
 void* luat_heap_malloc(size_t len) {
-    return malloc(len);
+    return tls_mem_alloc(len);
 }
 }
 
 
 void luat_heap_free(void* ptr) {
 void luat_heap_free(void* ptr) {
     if (ptr == NULL)
     if (ptr == NULL)
         return;
         return;
-    free(ptr);
+    tls_mem_free(ptr);
 }
 }
 
 
 void* luat_heap_realloc(void* ptr, size_t len) {
 void* luat_heap_realloc(void* ptr, size_t len) {
-    return realloc(ptr, len);
+    return tls_mem_realloc(ptr, len);
 }
 }
 
 
 void* luat_heap_calloc(size_t count, size_t _size) {
 void* luat_heap_calloc(size_t count, size_t _size) {
-    return calloc(count, _size);
+    return tls_mem_calloc(count, _size);
 }
 }
 #endif
 #endif