]> 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:34 +0000 (12:21 +0200)
src/rdb.c

index fd9fcacf2de3e855d88e5d8ec123d1a554caf4c3..b7ce8858e60a8a6538d431d8d8119d4707caca51 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 */