Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d569f39a
Commit
d569f39a
authored
Oct 31, 2011
by
antirez
Browse files
removed the vmpointer structure that is no longer user in Redis >= 2.5.x
parent
aba4adb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.h
View file @
d569f39a
...
@@ -236,33 +236,8 @@ typedef struct redisObject {
...
@@ -236,33 +236,8 @@ typedef struct redisObject {
unsigned
lru
:
22
;
/* lru time (relative to server.lruclock) */
unsigned
lru
:
22
;
/* lru time (relative to server.lruclock) */
int
refcount
;
int
refcount
;
void
*
ptr
;
void
*
ptr
;
/* VM fields are only allocated if VM is active, otherwise the
* object allocation function will just allocate
* sizeof(redisObjct) minus sizeof(redisObjectVM), so using
* Redis without VM active will not have any overhead. */
}
robj
;
}
robj
;
/* The VM pointer structure - identifies an object in the swap file.
*
* This object is stored in place of the value
* object in the main key->value hash table representing a database.
* Note that the first fields (type, storage) are the same as the redisObject
* structure so that vmPointer strucuters can be accessed even when casted
* as redisObject structures.
*
* This is useful as we don't know if a value object is or not on disk, but we
* are always able to read obj->storage to check this. For vmPointer
* structures "type" is set to REDIS_VMPOINTER (even if without this field
* is still possible to check the kind of object from the value of 'storage').*/
typedef
struct
vmPointer
{
unsigned
type
:
4
;
unsigned
storage
:
2
;
/* REDIS_VM_SWAPPED or REDIS_VM_LOADING */
unsigned
notused
:
26
;
unsigned
int
vtype
;
/* type of the object stored in the swap file */
off_t
page
;
/* the page at witch the object is stored on disk */
off_t
usedpages
;
/* number of pages used on disk */
}
vmpointer
;
/* Macro used to initalize a Redis object allocated on the stack.
/* Macro used to initalize a Redis object allocated on the stack.
* Note that this macro is taken near the structure definition to make sure
* Note that this macro is taken near the structure definition to make sure
* we'll update it when the structure is changed, to avoid bugs like
* we'll update it when the structure is changed, to avoid bugs like
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment