use skynet_malloc in skynet_realloc

This commit is contained in:
Cloud Wu
2014-04-22 15:27:45 +08:00
parent 61c8c765f4
commit a99befd44c
2 changed files with 2 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ skynet_malloc(size_t size) {
void *
skynet_realloc(void *ptr, size_t size) {
if (ptr == NULL) return malloc(size);
if (ptr == NULL) return skynet_malloc(size);
void* rawptr = clean_prefix(ptr);
void *newptr = je_realloc(rawptr, size+PREFIX_SIZE);

View File

@@ -93,7 +93,7 @@ main(int argc, char *argv[]) {
struct skynet_config config;
struct lua_State *L = luaL_newstate();
struct lua_State *L = lua_newstate(skynet_lalloc, NULL);
luaL_openlibs(L); // link lua lib
lua_close(L);