summaryrefslogtreecommitdiff
path: root/tests/allocator.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-20 20:34:28 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-20 20:34:28 -0700
commitd7ac5e2e0cb0521af1628e95774ad418af82af58 (patch)
tree2fca26ab47941b0511de460de0fc58f0a2882024 /tests/allocator.cpp
parentfcd1876a21593bd62580383874b57c734d629a0c (diff)
parent7258aea09be1847b3dcc99ca389990027d4a92d3 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'tests/allocator.cpp')
-rw-r--r--tests/allocator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp
index 3641585..094d5e5 100644
--- a/tests/allocator.cpp
+++ b/tests/allocator.cpp
@@ -1,6 +1,7 @@
#include "allocator.hpp"
#include <string.h>
+#include <assert.h>
// Low-level allocation functions
#if defined(_WIN32) || defined(_WIN64)
@@ -97,6 +98,8 @@ void* memory_allocate(size_t size)
size_t memory_size(void* ptr)
{
+ assert(ptr);
+
size_t result;
memcpy(&result, static_cast<size_t*>(ptr) - 1, sizeof(size_t));