mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugifx: clean prefix
This commit is contained in:
2
Makefile
2
Makefile
@@ -39,7 +39,7 @@ jemalloc : $(JEMALLOC_STATICLIB)
|
||||
# skynet
|
||||
|
||||
CSERVICE = snlua logger gate master harbor
|
||||
LUA_CLIB = skynet socketdriver int64 bson mongo md5 netpack cjson clientsocket memory
|
||||
LUA_CLIB = skynet socketdriver int64 bson mongo md5 netpack cjson clientsocket # memory
|
||||
|
||||
SKYNET_SRC = skynet_main.c skynet_handle.c skynet_module.c skynet_mq.c \
|
||||
skynet_server.c skynet_start.c skynet_timer.c skynet_error.c \
|
||||
|
||||
@@ -73,8 +73,7 @@ fill_prefix(char* ptr) {
|
||||
|
||||
inline static void*
|
||||
clean_prefix(char* ptr) {
|
||||
uint32_t* rawptr = (uint32_t*)ptr - 1;
|
||||
size_t size = je_malloc_usable_size(rawptr);
|
||||
size_t size = je_malloc_usable_size(ptr);
|
||||
uint32_t *p = (uint32_t *)(ptr + size - sizeof(uint32_t));
|
||||
uint32_t handle;
|
||||
memcpy(&handle, p, sizeof(handle));
|
||||
|
||||
Reference in New Issue
Block a user