Rémi Bernon : ntdll: Use block size helpers in heap_size.
Alexandre Julliard
julliard at winehq.org
Fri May 13 15:45:13 CDT 2022
Module: wine
Branch: master
Commit: accaf8f29a372f6a210933ffac3e548c3194e391
URL: https://source.winehq.org/git/wine.git/?a=commit;h=accaf8f29a372f6a210933ffac3e548c3194e391
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue May 3 22:59:54 2022 +0200
ntdll: Use block size helpers in heap_size.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/heap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 424f060b719..68f7e6edcc0 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -2054,10 +2054,7 @@ static NTSTATUS heap_size( HEAP *heap, const void *ptr, SIZE_T *size )
const ARENA_LARGE *large_arena = (const ARENA_LARGE *)ptr - 1;
*size = large_arena->data_size;
}
- else
- {
- *size = (block->size & ARENA_SIZE_MASK) - block->unused_bytes;
- }
+ else *size = block_get_size( block ) - block_get_overhead( block );
return STATUS_SUCCESS;
}
More information about the wine-cvs
mailing list