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
74453b7c
Commit
74453b7c
authored
May 21, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move min commit size to main heap struct.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
0f49c99a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
heap.c
dlls/ntdll/heap.c
+4
-4
No files found.
dlls/ntdll/heap.c
View file @
74453b7c
...
...
@@ -164,7 +164,6 @@ struct tagHEAP;
typedef
struct
tagSUBHEAP
{
SIZE_T
size
;
/* Size of the whole sub-heap */
SIZE_T
min_commit
;
/* Minimum committed size */
SIZE_T
commitSize
;
/* Committed size of the sub-heap */
struct
list
entry
;
/* Entry in sub-heap list */
struct
tagHEAP
*
heap
;
/* Main heap structure */
...
...
@@ -191,6 +190,7 @@ typedef struct tagHEAP
struct
list
subheap_list
;
/* Sub-heap list */
struct
list
large_list
;
/* Large blocks list */
SIZE_T
grow_size
;
/* Size of next subheap for growing heap */
SIZE_T
min_size
;
/* Minimum committed size */
DWORD
magic
;
/* Magic number */
DWORD
pending_pos
;
/* Position in pending free requests ring */
ARENA_INUSE
**
pending_free
;
/* Ring buffer for pending free requests */
...
...
@@ -649,12 +649,13 @@ static inline BOOL subheap_commit( SUBHEAP *subheap, const struct block *block,
static
inline
BOOL
subheap_decommit
(
SUBHEAP
*
subheap
,
const
void
*
commit_end
)
{
char
*
base
=
subheap_base
(
subheap
);
HEAP
*
heap
=
subheap
->
heap
;
SIZE_T
size
;
void
*
addr
;
commit_end
=
ROUND_ADDR
((
char
*
)
commit_end
+
COMMIT_MASK
,
COMMIT_MASK
);
commit_end
=
max
(
(
char
*
)
commit_end
,
(
char
*
)
subheap_base
(
subheap
)
+
subheap
->
min_commit
);
if
(
subheap
==
&
heap
->
subheap
)
commit_end
=
max
(
(
char
*
)
commit_end
,
(
char
*
)
base
+
heap
->
min_size
);
if
(
commit_end
>=
subheap_commit_end
(
subheap
))
return
TRUE
;
size
=
(
char
*
)
subheap_commit_end
(
subheap
)
-
(
char
*
)
commit_end
;
...
...
@@ -939,7 +940,6 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
subheap
=
address
;
subheap
->
heap
=
heap
;
subheap
->
size
=
totalSize
;
subheap
->
min_commit
=
0x10000
;
subheap
->
commitSize
=
commitSize
;
subheap
->
magic
=
SUBHEAP_MAGIC
;
subheap
->
headerSize
=
ROUND_SIZE
(
sizeof
(
SUBHEAP
)
);
...
...
@@ -956,13 +956,13 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
heap
->
shared
=
(
flags
&
HEAP_SHARED
)
!=
0
;
heap
->
magic
=
HEAP_MAGIC
;
heap
->
grow_size
=
max
(
HEAP_DEF_SIZE
,
totalSize
);
heap
->
min_size
=
commitSize
;
list_init
(
&
heap
->
subheap_list
);
list_init
(
&
heap
->
large_list
);
subheap
=
&
heap
->
subheap
;
subheap
->
heap
=
heap
;
subheap
->
size
=
totalSize
;
subheap
->
min_commit
=
commitSize
;
subheap
->
commitSize
=
commitSize
;
subheap
->
magic
=
SUBHEAP_MAGIC
;
subheap
->
headerSize
=
ROUND_SIZE
(
sizeof
(
HEAP
)
);
...
...
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