summaryrefslogtreecommitdiff
path: root/klm/util/mmap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'klm/util/mmap.cc')
-rw-r--r--klm/util/mmap.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/klm/util/mmap.cc b/klm/util/mmap.cc
index 6f79f26f..cee6a970 100644
--- a/klm/util/mmap.cc
+++ b/klm/util/mmap.cc
@@ -90,7 +90,9 @@ void scoped_memory::call_realloc(std::size_t size) {
if (!new_data) {
reset();
} else {
- reset(new_data, size, MALLOC_ALLOCATED);
+ data_ = new_data;
+ size_ = size;
+ source_ = MALLOC_ALLOCATED;
}
}