From 48b07bd3200a92a82b7500b10f14843204502060 Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 6 Dec 2017 19:47:00 -0800 Subject: 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. --- slab_automove.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'slab_automove.c') 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; -- cgit v1.2.1