From 6298632bfa00b90198bd76b82aa249985530e4fa Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 20 Apr 2015 19:23:25 +0500 Subject: 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. --- intern/guardedalloc/intern/mallocn_guarded_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern') 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; } -- cgit v1.2.3