Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions engines/default/item_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ typedef struct _hash_item {
rel_time_t time; /* least recent access */
rel_time_t exptime; /* When the item will expire (relative to process startup) */
uint8_t iflag; /* Internal flags: item type and flag */
uint16_t nkey; /* The total length of the key (in bytes) */
uint32_t nbytes; /* The total length of the data (in bytes) */
uint16_t nkey; /* The total length of the key */
uint32_t nbytes; /* The total length of the data */
/* Following fields are used to trade off memory space for performance */
uint32_t khash; /* The hash value of key string */
void *pfxptr; /* pointer to prefix structure */
Expand All @@ -173,10 +173,10 @@ typedef struct _list_elem_item {
uint8_t slabs_clsid; /* which slab class we're in */
uint8_t status; /* element lifecycle state: linked(in-list) or unlinked(removed but referenced) */
uint16_t reserved; /* reserved space */
uint16_t nbytes; /**< The total size of the data (in bytes) */
uint16_t nbytes; /* the size of the value */
struct _list_elem_item *next; /* next chain in double linked list */
struct _list_elem_item *prev; /* prev chain in double linked list */
char value[]; /**< the data itself */
char value[]; /* the data itself */
} list_elem_item;

/* set element */
Expand All @@ -185,20 +185,20 @@ typedef struct _set_elem_item {
uint8_t slabs_clsid; /* which slab class we're in */
uint8_t status; /* element lifecycle state: linked(in-set) or unlinked(removed but referenced) */
uint16_t reserved; /* reserved space */
uint16_t nbytes; /**< The total size of the data (in bytes) */
uint16_t nbytes; /* the size of the value */
struct _set_elem_item *next; /* hash chain next */
uint32_t hval; /* hash value */
char value[]; /**< the data itself */
char value[]; /* the data itself */
} set_elem_item;

/* map element */
typedef struct _map_elem_item {
uint16_t refcount;
uint8_t slabs_clsid; /* which slab class we're in */
uint8_t status; /* element lifecycle state: linked(in-map) or unlinked(removed but referenced) */
uint8_t nfield; /**< The total size of the field (in bytes) */
uint8_t nfield; /* the size of the field */
uint8_t reserved; /* reserved space */
uint16_t nbytes; /**< The total size of the data (in bytes) */
uint16_t nbytes; /* the size of the value */
struct _map_elem_item *next; /* hash chain next */
uint32_t hval; /* hash value */
unsigned char data[]; /* data: <field, value> */
Expand All @@ -209,9 +209,9 @@ typedef struct _btree_elem_item {
uint16_t refcount;
uint8_t slabs_clsid; /* which slab class we're in */
uint8_t status; /* element lifecycle state: linked(in-tree) or unlinked(removed but referenced) */
uint8_t nbkey; /* length of bkey */
uint8_t neflag; /* length of element flag */
uint16_t nbytes; /**< The total size of the data (in bytes) */
uint8_t nbkey; /* the size of the bkey */
uint8_t neflag; /* the size of the element flag */
uint16_t nbytes; /* the size of the value */
unsigned char data[]; /* data: <bkey, [eflag,] value> */
} btree_elem_item;

Expand Down
Loading