diff options
author | dormando <dormando@rydia.net> | 2017-12-06 19:47:00 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-12-07 15:28:13 -0800 |
commit | 48b07bd3200a92a82b7500b10f14843204502060 (patch) | |
tree | 65e1619e4374de044ffc226119a108df4068e1e4 /slab_automove.c | |
parent | bb1080bb9f8ab5271699bb84eb90de1fcf9ed695 (diff) | |
download | memcached-48b07bd3200a92a82b7500b10f14843204502060.tar.gz |
extstore: C version of automove algorithm
couple TODO items left for a new issue I thought of. Also hardcoded memory
buffer size which should be fixed.
also need to change the "free and re-init" logic to use a boolean in case any
related option changes.
Diffstat (limited to 'slab_automove.c')
-rw-r--r-- | slab_automove.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/slab_automove.c b/slab_automove.c index 8a66370..25a6bdb 100644 --- a/slab_automove.c +++ b/slab_automove.c @@ -30,7 +30,9 @@ typedef struct { slab_stats_automove sam_after[MAX_NUMBER_OF_SLAB_CLASSES]; } slab_automove; -void *slab_automove_init(uint32_t window_size, double max_age_ratio) { +void *slab_automove_init(struct settings *settings) { + uint32_t window_size = settings->slab_automove_window; + double max_age_ratio = settings->slab_automove_ratio; slab_automove *a = calloc(1, sizeof(slab_automove)); if (a == NULL) return NULL; |