1 /* 2 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. 3 * Description: improve heap dump. 4 * Create: 2020/11/20 5 */ 6 7 #include "ecma-globals.h" 8 #include "ecma-helpers.h" 9 #include "ext-utils.h" 10 #include "vm.h" 11 12 #include "stdlib.h" 13 JerryExtFree(void * ptr)14void JerryExtFree(void* ptr) 15 { 16 free(ptr); 17 } 18 JerryExtAlloc(size_t size)19void* JerryExtAlloc(size_t size) 20 { 21 return malloc(size); 22 } 23 JerryExtAllocStr(size_t size)24char* JerryExtAllocStr(size_t size) 25 { 26 return (char*)malloc(size); 27 } 28 JerryExtAllocStorageData(size_t size)29size_t* JerryExtAllocStorageData(size_t size) 30 { 31 return (size_t*)calloc(size, sizeof(size_t)); 32 } 33