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
9150071b
Commit
9150071b
authored
Oct 11, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Oct 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove shared heap functionality.
parent
40c7cb0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
64 deletions
+2
-64
heap.c
dlls/kernel32/heap.c
+2
-64
No files found.
dlls/kernel32/heap.c
View file @
9150071b
...
...
@@ -41,58 +41,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
globalmem
);
/* address where we try to map the system heap */
#define SYSTEM_HEAP_BASE ((void*)0x80000000)
#define SYSTEM_HEAP_SIZE 0x1000000
/* Default heap size = 16Mb */
static
HANDLE
systemHeap
;
/* globally shared heap */
BOOLEAN
WINAPI
RtlGetUserInfoHeap
(
HANDLE
handle
,
ULONG
flags
,
void
*
ptr
,
void
**
user_value
,
ULONG
*
user_flags
);
BOOLEAN
WINAPI
RtlSetUserValueHeap
(
HANDLE
handle
,
ULONG
flags
,
void
*
ptr
,
void
*
user_value
);
/***********************************************************************
* HEAP_CreateSystemHeap
*
* Create the system heap.
*/
static
inline
HANDLE
HEAP_CreateSystemHeap
(
void
)
{
int
created
;
void
*
base
;
HANDLE
map
,
event
;
/* create the system heap event first */
event
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
"__wine_system_heap_event"
);
if
(
!
(
map
=
CreateFileMappingA
(
INVALID_HANDLE_VALUE
,
NULL
,
SEC_COMMIT
|
PAGE_READWRITE
,
0
,
SYSTEM_HEAP_SIZE
,
"__wine_system_heap"
)))
return
0
;
created
=
(
GetLastError
()
!=
ERROR_ALREADY_EXISTS
);
if
(
!
(
base
=
MapViewOfFileEx
(
map
,
FILE_MAP_ALL_ACCESS
,
0
,
0
,
0
,
SYSTEM_HEAP_BASE
)))
{
/* pre-defined address not available */
ERR
(
"system heap base address %p not available
\n
"
,
SYSTEM_HEAP_BASE
);
return
0
;
}
if
(
created
)
/* newly created heap */
{
systemHeap
=
RtlCreateHeap
(
HEAP_SHARED
,
base
,
SYSTEM_HEAP_SIZE
,
SYSTEM_HEAP_SIZE
,
NULL
,
NULL
);
SetEvent
(
event
);
}
else
{
/* wait for the heap to be initialized */
WaitForSingleObject
(
event
,
INFINITE
);
systemHeap
=
base
;
}
CloseHandle
(
map
);
return
systemHeap
;
}
/***********************************************************************
* HeapCreate (KERNEL32.@)
*
* Create a heap object.
...
...
@@ -108,17 +60,8 @@ HANDLE WINAPI HeapCreate(
)
{
HANDLE
ret
;
if
(
flags
&
HEAP_SHARED
)
{
if
(
!
systemHeap
)
HEAP_CreateSystemHeap
();
else
WARN
(
"Shared Heap requested, returning system heap.
\n
"
);
ret
=
systemHeap
;
}
else
{
ret
=
RtlCreateHeap
(
flags
,
NULL
,
maxSize
,
initialSize
,
NULL
,
NULL
);
if
(
!
ret
)
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
}
ret
=
RtlCreateHeap
(
flags
,
NULL
,
maxSize
,
initialSize
,
NULL
,
NULL
);
if
(
!
ret
)
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
ret
;
}
...
...
@@ -134,11 +77,6 @@ HANDLE WINAPI HeapCreate(
*/
BOOL
WINAPI
HeapDestroy
(
HANDLE
heap
/* [in] Handle of heap */
)
{
if
(
heap
==
systemHeap
)
{
WARN
(
"attempt to destroy system heap, returning TRUE!
\n
"
);
return
TRUE
;
}
if
(
!
RtlDestroyHeap
(
heap
))
return
TRUE
;
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
...
...
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