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
c662992d
Commit
c662992d
authored
May 18, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Create free block after updating the size in HEAP_ShrinkBlock.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
419e4730
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
heap.c
dlls/ntdll/heap.c
+4
-4
No files found.
dlls/ntdll/heap.c
View file @
c662992d
...
...
@@ -815,17 +815,17 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
*/
static
void
HEAP_ShrinkBlock
(
SUBHEAP
*
subheap
,
ARENA_INUSE
*
pArena
,
SIZE_T
size
)
{
if
((
pArena
->
size
&
ARENA_SIZE_MASK
)
>=
size
+
HEAP_MIN_SHRINK_SIZE
)
SIZE_T
old_data_size
=
pArena
->
size
&
ARENA_SIZE_MASK
;
if
(
old_data_size
>=
size
+
HEAP_MIN_SHRINK_SIZE
)
{
HEAP_CreateFreeBlock
(
subheap
,
(
char
*
)(
pArena
+
1
)
+
size
,
(
pArena
->
size
&
ARENA_SIZE_MASK
)
-
size
);
/* assign size plus previous arena flags */
pArena
->
size
=
size
|
(
pArena
->
size
&
~
ARENA_SIZE_MASK
);
HEAP_CreateFreeBlock
(
subheap
,
(
char
*
)(
pArena
+
1
)
+
size
,
old_data_size
-
size
);
}
else
{
/* Turn off PREV_FREE flag in next block */
char
*
pNext
=
(
char
*
)(
pArena
+
1
)
+
(
pArena
->
size
&
ARENA_SIZE_MASK
)
;
char
*
pNext
=
(
char
*
)(
pArena
+
1
)
+
old_data_size
;
if
(
pNext
<
(
char
*
)
subheap
->
base
+
subheap
->
size
)
*
(
DWORD
*
)
pNext
&=
~
ARENA_FLAG_PREV_FREE
;
}
...
...
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