]> git.saurik.com Git - redis.git/commitdiff
Update memory peak stats while loading RDB / AOF.
authorantirez <antirez@gmail.com>
Wed, 24 Oct 2012 10:21:34 +0000 (12:21 +0200)
committerantirez <antirez@gmail.com>
Wed, 24 Oct 2012 10:21:41 +0000 (12:21 +0200)
src/rdb.c

index 9190ea514cb65ed12af35795003fabade5fd6102..5018473eb938942642631296a015d9ee1b671583 100644 (file)
--- 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 */