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
c749433e
Commit
c749433e
authored
Apr 29, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create the system heap event before the shared mapping to avoid a race
condition.
parent
0f6af2ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
heap.c
dlls/kernel/heap.c
+4
-13
No files found.
dlls/kernel/heap.c
View file @
c749433e
...
...
@@ -85,8 +85,9 @@ inline static HANDLE HEAP_CreateSystemHeap(void)
int
created
;
void
*
base
;
HANDLE
map
,
event
;
UNICODE_STRING
event_name
;
OBJECT_ATTRIBUTES
event_attr
;
/* create the system heap event first */
event
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
"__SystemHeapEvent"
);
if
(
!
(
map
=
CreateFileMappingA
(
INVALID_HANDLE_VALUE
,
NULL
,
SEC_COMMIT
|
PAGE_READWRITE
,
0
,
SYSTEM_HEAP_SIZE
,
"__SystemHeap"
)))
return
0
;
...
...
@@ -99,21 +100,11 @@ inline static HANDLE HEAP_CreateSystemHeap(void)
return
0
;
}
/* create the system heap event */
RtlCreateUnicodeStringFromAsciiz
(
&
event_name
,
"__SystemHeapEvent"
);
event_attr
.
Length
=
sizeof
(
event_attr
);
event_attr
.
RootDirectory
=
0
;
event_attr
.
ObjectName
=
&
event_name
;
event_attr
.
Attributes
=
0
;
event_attr
.
SecurityDescriptor
=
NULL
;
event_attr
.
SecurityQualityOfService
=
NULL
;
NtCreateEvent
(
&
event
,
EVENT_ALL_ACCESS
,
&
event_attr
,
TRUE
,
FALSE
);
if
(
created
)
/* newly created heap */
{
systemHeap
=
RtlCreateHeap
(
HEAP_SHARED
,
base
,
SYSTEM_HEAP_SIZE
,
SYSTEM_HEAP_SIZE
,
NULL
,
NULL
);
NtSetEvent
(
event
,
NULL
);
SetEvent
(
event
);
}
else
{
...
...
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