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
9f7907eb
Commit
9f7907eb
authored
Aug 01, 2000
by
Peter Ganten
Committed by
Alexandre Julliard
Aug 01, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved Wine private heap creation flags to other values.
Return system heap when a shared heap is requested.
parent
2e9f786d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
winnt.h
include/winnt.h
+8
-4
heap.c
memory/heap.c
+13
-3
No files found.
include/winnt.h
View file @
9f7907eb
...
...
@@ -163,10 +163,14 @@ typedef struct _SINGLE_LIST_ENTRY {
#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
#define HEAP_CREATE_ALIGN_16 0x00010000
#define HEAP_CREATE_ENABLE_TRACING 0x00020000
#define HEAP_WINE_SEGPTR 0x01000000
/* Not a Win32 flag */
#define HEAP_WINE_CODESEG 0x02000000
/* Not a Win32 flag */
#define HEAP_WINE_CODE16SEG 0x04000000
/* Not a Win32 flag */
#define HEAP_WINE_SHARED 0x08000000
/* Not a Win32 flag */
/* This flag allows it to create heaps shared by all processes under win95,
FIXME: correct name */
#define HEAP_SHARED 0x04000000
#define HEAP_WINE_SEGPTR 0x10000000
/* Not a Win32 flag */
#define HEAP_WINE_CODESEG 0x20000000
/* Not a Win32 flag */
#define HEAP_WINE_CODE16SEG 0x40000000
/* Not a Win32 flag */
/* Processor feature flags. */
#define PF_FLOATING_POINT_PRECISION_ERRATA 0
...
...
memory/heap.c
View file @
9f7907eb
...
...
@@ -430,7 +430,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
/* Decommit the end of the heap */
if
(
!
(
subheap
->
heap
->
flags
&
HEAP_
WINE_
SHARED
))
HEAP_Decommit
(
subheap
,
pFree
+
1
);
if
(
!
(
subheap
->
heap
->
flags
&
HEAP_SHARED
))
HEAP_Decommit
(
subheap
,
pFree
+
1
);
}
...
...
@@ -469,7 +469,7 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
/* Commit memory */
if
(
flags
&
HEAP_
WINE_
SHARED
)
if
(
flags
&
HEAP_SHARED
)
commitSize
=
totalSize
;
/* always commit everything in a shared heap */
if
(
!
VirtualAlloc
(
address
,
commitSize
,
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
))
{
...
...
@@ -998,6 +998,11 @@ HANDLE WINAPI HeapCreate(
)
{
SUBHEAP
*
subheap
;
if
(
flags
&
HEAP_SHARED
)
{
FIXME
(
"Shared Heap requested, returning system heap.
\n
"
);
return
SystemHeap
;
}
/* Allocate the heap block */
if
(
!
maxSize
)
...
...
@@ -1039,6 +1044,11 @@ BOOL WINAPI HeapDestroy( HANDLE heap /* [in] Handle of heap */ )
HEAP
*
heapPtr
=
HEAP_GetPtr
(
heap
);
SUBHEAP
*
subheap
;
if
(
heap
==
SystemHeap
)
{
FIXME
(
"attempt to destroy system heap, returning TRUE!
\n
"
);
return
TRUE
;
}
TRACE
(
"%08x
\n
"
,
heap
);
if
(
!
heapPtr
)
return
FALSE
;
...
...
@@ -1570,7 +1580,7 @@ BOOL HEAP_CreateSystemHeap(void)
if
(
created
)
/* newly created heap */
{
HEAP_InitSubHeap
(
heapPtr
,
heapPtr
,
HEAP_
WINE_
SHARED
,
0
,
HEAP_DEF_SIZE
);
HEAP_InitSubHeap
(
heapPtr
,
heapPtr
,
HEAP_SHARED
,
0
,
HEAP_DEF_SIZE
);
HeapLock
(
heap
);
descr
=
heapPtr
->
private
=
HeapAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
sizeof
(
*
descr
)
);
assert
(
descr
);
...
...
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