summaryrefslogtreecommitdiff
path: root/vpx_mem/vpx_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'vpx_mem/vpx_mem.c')
-rw-r--r--vpx_mem/vpx_mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpx_mem/vpx_mem.c b/vpx_mem/vpx_mem.c
index eeba34c37..18abf1158 100644
--- a/vpx_mem/vpx_mem.c
+++ b/vpx_mem/vpx_mem.c
@@ -16,12 +16,14 @@
#include "include/vpx_mem_intrnl.h"
#include "vpx/vpx_integer.h"
+#if !defined(VPX_MAX_ALLOCABLE_MEMORY)
#if SIZE_MAX > (1ULL << 40)
#define VPX_MAX_ALLOCABLE_MEMORY (1ULL << 40)
#else
// For 32-bit targets keep this below INT_MAX to avoid valgrind warnings.
#define VPX_MAX_ALLOCABLE_MEMORY ((1ULL << 31) - (1 << 16))
#endif
+#endif
// Returns 0 in case of overflow of nmemb * size.
static int check_size_argument_overflow(uint64_t nmemb, uint64_t size) {