[PATCH 2/5] ntdll: Use block size helpers in heap_size.

Rémi Bernon wine at gitlab.winehq.org
Fri May 13 03:18:25 CDT 2022


From: Rémi Bernon <rbernon at codeweavers.com>

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 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;
 }
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/65



More information about the wine-devel mailing list