From 68fc64afd46acef8109a388311730a4712a23e6d Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 24 Oct 2012 12:21:34 +0200 Subject: [PATCH] Update memory peak stats while loading RDB / AOF. --- src/rdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rdb.c b/src/rdb.c index 9190ea51..5018473e 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -1010,6 +1010,8 @@ void startLoading(FILE *fp) { /* Refresh the loading progress info */ void loadingProgress(off_t pos) { server.loading_loaded_bytes = pos; + if (server.stat_peak_memory < zmalloc_used_memory()) + server.stat_peak_memory = zmalloc_used_memory(); } /* Loading finished */ -- 2.45.2