mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
handle is uint32_t
This commit is contained in:
@@ -21,8 +21,8 @@ typedef struct _mem_data {
|
|||||||
static mem_data mem_stats[SLOT_SIZE];
|
static mem_data mem_stats[SLOT_SIZE];
|
||||||
|
|
||||||
static size_t*
|
static size_t*
|
||||||
get_allocated_field(handle) {
|
get_allocated_field(uint32_t handle) {
|
||||||
int h = (handle & (SLOT_SIZE - 1));
|
int h = (int)(handle & (SLOT_SIZE - 1));
|
||||||
mem_data *data = &mem_stats[h];
|
mem_data *data = &mem_stats[h];
|
||||||
if(data->handle == 0 || data->allocated == 0) {
|
if(data->handle == 0 || data->allocated == 0) {
|
||||||
__sync_synchronize();
|
__sync_synchronize();
|
||||||
|
|||||||
Reference in New Issue
Block a user