Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c2b89fd7
Commit
c2b89fd7
authored
May 21, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Introduce a new subheap_overhead helper.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
37b10111
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
heap.c
dlls/ntdll/heap.c
+8
-3
No files found.
dlls/ntdll/heap.c
View file @
c2b89fd7
...
...
@@ -271,6 +271,11 @@ static inline SIZE_T subheap_size( const SUBHEAP *subheap )
return
subheap
->
size
;
}
static
inline
SIZE_T
subheap_overhead
(
const
SUBHEAP
*
subheap
)
{
return
subheap
->
headerSize
;
}
static
inline
const
void
*
subheap_commit_end
(
const
SUBHEAP
*
subheap
)
{
return
(
char
*
)
subheap_base
(
subheap
)
+
subheap
->
commitSize
;
...
...
@@ -499,7 +504,7 @@ static void heap_dump( const HEAP *heap )
if
(
!
check_subheap
(
subheap
))
return
;
overhead
+=
(
char
*
)
first_block
(
subheap
)
-
base
;
overhead
+=
subheap_overhead
(
subheap
)
;
for
(
block
=
first_block
(
subheap
);
block
;
block
=
next_block
(
subheap
,
block
))
{
if
(
block_get_flags
(
block
)
&
ARENA_FLAG_FREE
)
...
...
@@ -1008,7 +1013,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
/* Create the first free block */
create_free_block
(
subheap
,
first_block
(
subheap
),
subheap
->
size
-
subheap
->
headerSize
);
create_free_block
(
subheap
,
first_block
(
subheap
),
subheap
_size
(
subheap
)
-
subheap_overhead
(
subheap
)
);
return
subheap
;
}
...
...
@@ -1863,7 +1868,7 @@ static NTSTATUS heap_walk( const HEAP *heap, struct rtl_heap_entry *entry )
subheap
=
LIST_ENTRY
(
next
,
SUBHEAP
,
entry
);
base
=
subheap_base
(
subheap
);
entry
->
lpData
=
base
;
entry
->
cbData
=
(
char
*
)
first_block
(
subheap
)
-
base
;
entry
->
cbData
=
subheap_overhead
(
subheap
)
;
entry
->
cbOverhead
=
0
;
entry
->
iRegionIndex
=
0
;
entry
->
wFlags
=
RTL_HEAP_ENTRY_REGION
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment