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
f5f17374
Commit
f5f17374
authored
Apr 28, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store the pending free list in the main process heap.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9fd2330a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
heap.c
dlls/ntdll/heap.c
+4
-14
No files found.
dlls/ntdll/heap.c
View file @
f5f17374
...
...
@@ -1508,14 +1508,9 @@ void heap_set_debug_flags( HANDLE handle )
if
((
heap
->
flags
&
HEAP_GROWABLE
)
&&
!
heap
->
pending_free
&&
((
flags
&
HEAP_FREE_CHECKING_ENABLED
)
||
RUNNING_ON_VALGRIND
))
{
void
*
ptr
=
NULL
;
SIZE_T
size
=
MAX_FREE_PENDING
*
sizeof
(
*
heap
->
pending_free
);
if
(
!
virtual_alloc_aligned
(
&
ptr
,
0
,
&
size
,
MEM_COMMIT
,
PAGE_READWRITE
,
4
))
{
heap
->
pending_free
=
ptr
;
heap
->
pending_pos
=
0
;
}
heap
->
pending_free
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
MAX_FREE_PENDING
*
sizeof
(
*
heap
->
pending_free
)
);
heap
->
pending_pos
=
0
;
}
}
...
...
@@ -1622,12 +1617,7 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
}
subheap_notify_free_all
(
&
heapPtr
->
subheap
);
if
(
heapPtr
->
pending_free
)
{
size
=
0
;
addr
=
heapPtr
->
pending_free
;
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
heapPtr
->
pending_free
);
size
=
0
;
addr
=
heapPtr
->
subheap
.
base
;
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
...
...
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