Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2c46ee18
Commit
2c46ee18
authored
May 24, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move subheap decommit hysteresis to free_used_block.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
d0ad5d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
heap.c
dlls/ntdll/heap.c
+6
-3
No files found.
dlls/ntdll/heap.c
View file @
2c46ee18
...
...
@@ -649,8 +649,7 @@ static inline BOOL HEAP_Decommit( SUBHEAP *subheap, void *ptr )
SIZE_T
decommit_size
;
SIZE_T
size
=
(
char
*
)
ptr
-
(
char
*
)
subheap
->
base
;
/* round to next block and add one full block */
size
=
((
size
+
COMMIT_MASK
)
&
~
COMMIT_MASK
)
+
COMMIT_MASK
+
1
;
size
=
((
size
+
COMMIT_MASK
)
&
~
COMMIT_MASK
);
size
=
max
(
size
,
subheap
->
min_commit
);
if
(
size
>=
subheap
->
commitSize
)
return
TRUE
;
decommit_size
=
subheap
->
commitSize
-
size
;
...
...
@@ -748,7 +747,11 @@ static void free_used_block( SUBHEAP *subheap, struct block *block )
list_remove
(
&
subheap
->
entry
);
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
}
else
if
(
!
heap
->
shared
)
HEAP_Decommit
(
subheap
,
entry
+
1
);
else
if
(
!
heap
->
shared
)
{
/* keep room for a full commited block as hysteresis */
HEAP_Decommit
(
subheap
,
(
char
*
)(
entry
+
1
)
+
(
COMMIT_MASK
+
1
)
);
}
}
...
...
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