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
9d34933f
Commit
9d34933f
authored
Apr 19, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a dedicated member for shared heap flag.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb087788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
heap.c
dlls/ntdll/heap.c
+4
-2
No files found.
dlls/ntdll/heap.c
View file @
9d34933f
...
...
@@ -153,6 +153,7 @@ typedef struct tagHEAP
/* For Vista through 10, 'flags' is at offset 0x40 (x86) / 0x70 (x64) */
DWORD
flags
;
/* Heap flags */
DWORD
force_flags
;
/* Forced heap flags for debugging */
BOOL
shared
;
/* System shared heap */
SUBHEAP
subheap
;
/* First sub-heap */
struct
list
entry
;
/* Entry in process heap list */
struct
list
subheap_list
;
/* Sub-heap list */
...
...
@@ -687,7 +688,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
/* Decommit the end of the heap */
if
(
!
(
subheap
->
heap
->
flags
&
HEAP_SHARED
))
HEAP_Decommit
(
subheap
,
pFree
+
1
);
if
(
!
(
subheap
->
heap
->
shared
))
HEAP_Decommit
(
subheap
,
pFree
+
1
);
}
...
...
@@ -922,6 +923,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
heap
=
address
;
heap
->
flags
=
flags
;
heap
->
shared
=
(
flags
&
HEAP_SHARED
)
!=
0
;
heap
->
magic
=
HEAP_MAGIC
;
heap
->
grow_size
=
max
(
HEAP_DEF_SIZE
,
totalSize
);
list_init
(
&
heap
->
subheap_list
);
...
...
@@ -967,7 +969,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
heap
->
critSection
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": HEAP.critSection"
);
}
if
(
flags
&
HEAP_SHARED
)
if
(
heap
->
shared
)
{
/* let's assume that only one thread at a time will try to do this */
HANDLE
sem
=
heap
->
critSection
.
LockSemaphore
;
...
...
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