use skynet malloc api directly

This commit is contained in:
Cloud Wu
2014-04-22 12:26:08 +08:00
parent 08c511160f
commit 75a28b0fcc
19 changed files with 98 additions and 107 deletions

View File

@@ -1,4 +1,3 @@
// include skynet.h first for malloc hook
#include "skynet.h"
#include "skynet_env.h"
@@ -49,7 +48,7 @@ skynet_setenv(const char *key, const char *value) {
void
skynet_env_init() {
E = malloc(sizeof(*E));
E = skynet_malloc(sizeof(*E));
E->lock = 0;
E->L = luaL_newstate();
}