aboutsummaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/vespamalloc/malloc/mmappool.h
diff options
context:
space:
mode:
Diffstat (limited to 'vespamalloc/src/vespamalloc/malloc/mmappool.h')
-rw-r--r--vespamalloc/src/vespamalloc/malloc/mmappool.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/vespamalloc/src/vespamalloc/malloc/mmappool.h b/vespamalloc/src/vespamalloc/malloc/mmappool.h
index c14f58ce564..0a3dd5d0a0a 100644
--- a/vespamalloc/src/vespamalloc/malloc/mmappool.h
+++ b/vespamalloc/src/vespamalloc/malloc/mmappool.h
@@ -1,7 +1,8 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <atomic>
+#include <cstdio>
#include <mutex>
#include <unordered_map>
@@ -18,6 +19,7 @@ public:
size_t get_size(void *) const;
size_t getNumMappings() const;
size_t getMmappedBytes() const;
+ size_t getMmappedBytesPeak() const;
void info(FILE * os, size_t level) const;
private:
struct MMapInfo {
@@ -27,6 +29,8 @@ private:
};
const size_t _page_size;
const int _huge_flags;
+ size_t _peakBytes;
+ size_t _currentBytes;
std::atomic<size_t> _count;
std::atomic<bool> _has_hugepage_failure_just_happened;
mutable std::mutex _mutex;