diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-20 17:23:25 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-20 17:23:25 +0300 |
commit | 6298632bfa00b90198bd76b82aa249985530e4fa (patch) | |
tree | 5d4e53f2f21eb548a66d555edabb1938419e99fb /intern/guardedalloc | |
parent | 42e427905cd77dc5e8d805b121c754e1be54737f (diff) |
Guardedalloc: Don't use aligned blocks to calculate memory sloppyness
Aligned memory is allocated with memalign() and malloc_usable_size() can't be
used to measure this block.
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r-- | intern/guardedalloc/intern/mallocn_guarded_impl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index bdcace243d9..88d6f35d438 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -711,7 +711,7 @@ void MEM_guarded_printmemlist_stats(void) totpb++; pb++; - if (!membl->mmap) { + if (!membl->mmap && membl->alignment == 0) { mem_in_use_slop += (sizeof(MemHead) + sizeof(MemTail) + malloc_usable_size((void *)membl)) - membl->len; } |