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
5f230064
Commit
5f230064
authored
Jun 30, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Go back to growing the heap in smaller increments once we start running…
ntdll: Go back to growing the heap in smaller increments once we start running out of address space.
parent
c03991be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
heap.c
dlls/ntdll/heap.c
+12
-5
No files found.
dlls/ntdll/heap.c
View file @
5f230064
...
@@ -927,11 +927,18 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
...
@@ -927,11 +927,18 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
total_size
=
size
+
ROUND_SIZE
(
sizeof
(
SUBHEAP
))
+
sizeof
(
ARENA_INUSE
)
+
sizeof
(
ARENA_FREE
);
total_size
=
size
+
ROUND_SIZE
(
sizeof
(
SUBHEAP
))
+
sizeof
(
ARENA_INUSE
)
+
sizeof
(
ARENA_FREE
);
if
(
total_size
<
size
)
return
NULL
;
/* overflow */
if
(
total_size
<
size
)
return
NULL
;
/* overflow */
if
(
!
(
subheap
=
HEAP_CreateSubHeap
(
heap
,
NULL
,
heap
->
flags
,
total_size
,
if
((
subheap
=
HEAP_CreateSubHeap
(
heap
,
NULL
,
heap
->
flags
,
total_size
,
max
(
heap
->
grow_size
,
total_size
)
)))
max
(
heap
->
grow_size
,
total_size
)
)))
return
NULL
;
{
if
(
heap
->
grow_size
<
128
*
1024
*
1024
)
heap
->
grow_size
*=
2
;
if
(
heap
->
grow_size
<
128
*
1024
*
1024
)
heap
->
grow_size
*=
2
;
}
else
while
(
!
subheap
)
/* shrink the grow size again if we are running out of space */
{
if
(
heap
->
grow_size
<=
total_size
||
heap
->
grow_size
<=
4
*
1024
*
1024
)
return
NULL
;
heap
->
grow_size
/=
2
;
subheap
=
HEAP_CreateSubHeap
(
heap
,
NULL
,
heap
->
flags
,
total_size
,
max
(
heap
->
grow_size
,
total_size
)
);
}
TRACE
(
"created new sub-heap %p of %08lx bytes for heap %p
\n
"
,
TRACE
(
"created new sub-heap %p of %08lx bytes for heap %p
\n
"
,
subheap
,
subheap
->
size
,
heap
);
subheap
,
subheap
->
size
,
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