mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
bugifx: clean prefix
This commit is contained in:
2
Makefile
2
Makefile
@@ -39,7 +39,7 @@ jemalloc : $(JEMALLOC_STATICLIB)
|
|||||||
# skynet
|
# skynet
|
||||||
|
|
||||||
CSERVICE = snlua logger gate master harbor
|
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_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 \
|
skynet_server.c skynet_start.c skynet_timer.c skynet_error.c \
|
||||||
|
|||||||
@@ -73,8 +73,7 @@ fill_prefix(char* ptr) {
|
|||||||
|
|
||||||
inline static void*
|
inline static void*
|
||||||
clean_prefix(char* ptr) {
|
clean_prefix(char* ptr) {
|
||||||
uint32_t* rawptr = (uint32_t*)ptr - 1;
|
size_t size = je_malloc_usable_size(ptr);
|
||||||
size_t size = je_malloc_usable_size(rawptr);
|
|
||||||
uint32_t *p = (uint32_t *)(ptr + size - sizeof(uint32_t));
|
uint32_t *p = (uint32_t *)(ptr + size - sizeof(uint32_t));
|
||||||
uint32_t handle;
|
uint32_t handle;
|
||||||
memcpy(&handle, p, sizeof(handle));
|
memcpy(&handle, p, sizeof(handle));
|
||||||
|
|||||||
Reference in New Issue
Block a user