summaryrefslogtreecommitdiff
path: root/zen/zstring.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
commit669df123648aaa6aeccc70206b5417bc48b4e9ae (patch)
tree463c107a8d6405020bb304f7a7253e6b64afeee0 /zen/zstring.h
parent5.18 (diff)
downloadFreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip
5.19
Diffstat (limited to 'zen/zstring.h')
-rw-r--r--zen/zstring.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/zen/zstring.h b/zen/zstring.h
index 80c267e3..f103faf7 100644
--- a/zen/zstring.h
+++ b/zen/zstring.h
@@ -28,11 +28,11 @@ class AllocatorFreeStoreChecked
public:
static void* allocate(size_t size) //throw std::bad_alloc
{
- void* newMem = ::operator new(size);
+ void* ptr = zen::AllocatorOptimalSpeed::allocate(size);
#ifndef NDEBUG
- z_impl::leakCheckerInsert(newMem, size); //test Zbase for memory leaks
+ z_impl::leakCheckerInsert(ptr, size); //test Zbase for memory leaks
#endif
- return newMem;
+ return ptr;
}
static void deallocate(void* ptr)
@@ -40,10 +40,10 @@ public:
#ifndef NDEBUG
z_impl::leakCheckerRemove(ptr); //check for memory leaks
#endif
- ::operator delete(ptr);
+ zen::AllocatorOptimalSpeed::deallocate(ptr);
}
- static size_t calcCapacity(size_t length) { return std::max<size_t>(16, length + length / 2); } //exponential growth + min size
+ static size_t calcCapacity(size_t length) { return zen::AllocatorOptimalSpeed::calcCapacity(length); }
};
bgstack15