Explorar o código

add:luat_heap_realloc使用OS_Realloc

Dozingfiretruck %!s(int64=4) %!d(string=hai) anos
pai
achega
77344e4bbb
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      application/src/luat_malloc_air105.c

+ 1 - 5
application/src/luat_malloc_air105.c

@@ -49,11 +49,7 @@ void luat_heap_free(void* ptr) {
 }
 
 void* luat_heap_realloc(void* ptr, size_t len) {
-    void* tmp = luat_heap_malloc(len);
-    if (tmp && ptr) {
-        memcpy(tmp, ptr, len);
-    }
-    return tmp;
+    return OS_Realloc(ptr,len);
 }
 
 void* luat_heap_calloc(size_t count, size_t _size) {