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
75b78517
Commit
75b78517
authored
May 30, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Merge common resize case in heap_realloc.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
0b4266c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
heap.c
dlls/ntdll/heap.c
+2
-8
No files found.
dlls/ntdll/heap.c
View file @
75b78517
...
...
@@ -1609,8 +1609,6 @@ static NTSTATUS heap_reallocate( HEAP *heap, ULONG flags, void *ptr, SIZE_T size
list_remove
(
&
entry
->
entry
);
old_block_size
+=
block_get_size
(
next
);
if
(
!
subheap_commit
(
subheap
,
block
,
block_size
))
return
STATUS_NO_MEMORY
;
valgrind_notify_resize
(
block
+
1
,
old_size
,
size
);
shrink_used_block
(
subheap
,
block
,
block_get_flags
(
block
),
old_block_size
,
block_size
,
size
);
}
else
{
...
...
@@ -1624,13 +1622,9 @@ static NTSTATUS heap_reallocate( HEAP *heap, ULONG flags, void *ptr, SIZE_T size
return
STATUS_SUCCESS
;
}
}
else
{
valgrind_notify_resize
(
block
+
1
,
old_size
,
size
);
shrink_used_block
(
subheap
,
block
,
block_get_flags
(
block
),
old_block_size
,
block_size
,
size
);
}
/* Clear the extra bytes if needed */
valgrind_notify_resize
(
block
+
1
,
old_size
,
size
);
shrink_used_block
(
subheap
,
block
,
block_get_flags
(
block
),
old_block_size
,
block_size
,
size
);
if
(
size
<=
old_size
)
mark_block_tail
(
(
char
*
)(
block
+
1
)
+
size
,
block
->
unused_bytes
,
flags
);
else
initialize_block
(
(
char
*
)(
block
+
1
)
+
old_size
,
size
-
old_size
,
block
->
unused_bytes
,
flags
);
...
...
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