zmalloc: zmalloc_get_smap_bytes_by_field() modified to work for any PID.

The goal is to get copy-on-write amount of the child from the parent.
This commit is contained in:
antirez
2016-09-19 10:28:05 +02:00
parent b13759e90a
commit 945a2f948e
5 changed files with 24 additions and 12 deletions

View File

@ -1328,7 +1328,7 @@ int rewriteAppendOnlyFileBackground(void) {
redisSetProcTitle("redis-aof-rewrite");
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
if (rewriteAppendOnlyFile(tmpfile) == C_OK) {
size_t private_dirty = zmalloc_get_private_dirty();
size_t private_dirty = zmalloc_get_private_dirty(-1);
if (private_dirty) {
serverLog(LL_NOTICE,