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
871d2b94
Commit
871d2b94
authored
Nov 25, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Reallocate a new block if we failed to commit.
parent
d0b46b2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
heap.c
dlls/ntdll/heap.c
+1
-2
No files found.
dlls/ntdll/heap.c
View file @
871d2b94
...
@@ -1662,7 +1662,7 @@ static NTSTATUS heap_reallocate( struct heap *heap, ULONG flags, struct block *b
...
@@ -1662,7 +1662,7 @@ static NTSTATUS heap_reallocate( struct heap *heap, ULONG flags, struct block *b
if
(
!
(
next
=
next_block
(
subheap
,
block
))
||
!
(
block_get_flags
(
next
)
&
BLOCK_FLAG_FREE
)
||
if
(
!
(
next
=
next_block
(
subheap
,
block
))
||
!
(
block_get_flags
(
next
)
&
BLOCK_FLAG_FREE
)
||
block_size
>=
HEAP_MIN_LARGE_BLOCK_SIZE
||
block_size
>=
HEAP_MIN_LARGE_BLOCK_SIZE
||
block_size
>
old_block_size
+
block_get_size
(
next
))
block_size
>
old_block_size
+
block_get_size
(
next
)
||
!
subheap_commit
(
heap
,
subheap
,
block
,
block_size
)
)
{
{
if
(
flags
&
HEAP_REALLOC_IN_PLACE_ONLY
)
return
STATUS_NO_MEMORY
;
if
(
flags
&
HEAP_REALLOC_IN_PLACE_ONLY
)
return
STATUS_NO_MEMORY
;
if
((
status
=
heap_allocate
(
heap
,
flags
&
~
HEAP_ZERO_MEMORY
,
block_size
,
size
,
ret
)))
return
status
;
if
((
status
=
heap_allocate
(
heap
,
flags
&
~
HEAP_ZERO_MEMORY
,
block_size
,
size
,
ret
)))
return
status
;
...
@@ -1678,7 +1678,6 @@ static NTSTATUS heap_reallocate( struct heap *heap, ULONG flags, struct block *b
...
@@ -1678,7 +1678,6 @@ static NTSTATUS heap_reallocate( struct heap *heap, ULONG flags, struct block *b
entry
=
(
struct
entry
*
)
next
;
entry
=
(
struct
entry
*
)
next
;
list_remove
(
&
entry
->
entry
);
list_remove
(
&
entry
->
entry
);
old_block_size
+=
block_get_size
(
next
);
old_block_size
+=
block_get_size
(
next
);
if
(
!
subheap_commit
(
heap
,
subheap
,
block
,
block_size
))
return
STATUS_NO_MEMORY
;
}
}
valgrind_notify_resize
(
block
+
1
,
old_size
,
size
);
valgrind_notify_resize
(
block
+
1
,
old_size
,
size
);
...
...
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