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
5e787ba5
Commit
5e787ba5
authored
Aug 03, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hack to make the main heap critical section have a proper debug info
structure.
parent
7a15eb93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
critsection.c
dlls/ntdll/critsection.c
+11
-15
heap.c
dlls/ntdll/heap.c
+20
-1
No files found.
dlls/ntdll/critsection.c
View file @
5e787ba5
...
...
@@ -114,22 +114,18 @@ NTSTATUS WINAPI RtlInitializeCriticalSection( RTL_CRITICAL_SECTION *crit )
*/
NTSTATUS
WINAPI
RtlInitializeCriticalSectionAndSpinCount
(
RTL_CRITICAL_SECTION
*
crit
,
ULONG
spincount
)
{
if
(
!
GetProcessHeap
())
crit
->
DebugInfo
=
NULL
;
else
crit
->
DebugInfo
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
RTL_CRITICAL_SECTION_DEBUG
))
;
if
(
crit
->
DebugInfo
)
{
crit
->
DebugInfo
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
RTL_CRITICAL_SECTION_DEBUG
));
if
(
crit
->
DebugInfo
)
{
crit
->
DebugInfo
->
Type
=
0
;
crit
->
DebugInfo
->
CreatorBackTraceIndex
=
0
;
crit
->
DebugInfo
->
CriticalSection
=
crit
;
crit
->
DebugInfo
->
ProcessLocksList
.
Blink
=
&
(
crit
->
DebugInfo
->
ProcessLocksList
);
crit
->
DebugInfo
->
ProcessLocksList
.
Flink
=
&
(
crit
->
DebugInfo
->
ProcessLocksList
);
crit
->
DebugInfo
->
EntryCount
=
0
;
crit
->
DebugInfo
->
ContentionCount
=
0
;
crit
->
DebugInfo
->
Spare
[
0
]
=
0
;
crit
->
DebugInfo
->
Spare
[
1
]
=
0
;
}
crit
->
DebugInfo
->
Type
=
0
;
crit
->
DebugInfo
->
CreatorBackTraceIndex
=
0
;
crit
->
DebugInfo
->
CriticalSection
=
crit
;
crit
->
DebugInfo
->
ProcessLocksList
.
Blink
=
&
(
crit
->
DebugInfo
->
ProcessLocksList
);
crit
->
DebugInfo
->
ProcessLocksList
.
Flink
=
&
(
crit
->
DebugInfo
->
ProcessLocksList
);
crit
->
DebugInfo
->
EntryCount
=
0
;
crit
->
DebugInfo
->
ContentionCount
=
0
;
crit
->
DebugInfo
->
Spare
[
0
]
=
0
;
crit
->
DebugInfo
->
Spare
[
1
]
=
0
;
}
crit
->
LockCount
=
-
1
;
crit
->
RecursionCount
=
0
;
...
...
dlls/ntdll/heap.c
View file @
5e787ba5
...
...
@@ -172,6 +172,14 @@ static inline void clear_block( void *ptr, SIZE_T size )
memset
(
ptr
,
0
,
size
);
}
static
RTL_CRITICAL_SECTION_DEBUG
process_heap_critsect_debug
=
{
0
,
0
,
NULL
,
/* will be set later */
{
&
process_heap_critsect_debug
.
ProcessLocksList
,
&
process_heap_critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
0
,
(
DWORD
)(
__FILE__
": main process heap section"
)
}
};
/***********************************************************************
* HEAP_Dump
*/
...
...
@@ -611,7 +619,18 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
/* Initialize critical section */
RtlInitializeCriticalSection
(
&
heap
->
critSection
);
if
(
!
processHeap
)
/* do it by hand to avoid memory allocations */
{
heap
->
critSection
.
DebugInfo
=
&
process_heap_critsect_debug
;
heap
->
critSection
.
LockCount
=
-
1
;
heap
->
critSection
.
RecursionCount
=
0
;
heap
->
critSection
.
OwningThread
=
0
;
heap
->
critSection
.
LockSemaphore
=
0
;
heap
->
critSection
.
SpinCount
=
0
;
process_heap_critsect_debug
.
CriticalSection
=
&
heap
->
critSection
;
}
else
RtlInitializeCriticalSection
(
&
heap
->
critSection
);
if
(
flags
&
HEAP_SHARED
)
{
/* let's assume that only one thread at a time will try to do this */
...
...
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