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
eb931b84
Commit
eb931b84
authored
May 03, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Rename HEAP_FindFreeBlock size parameter.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b20f4666
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
heap.c
dlls/ntdll/heap.c
+7
-8
No files found.
dlls/ntdll/heap.c
View file @
eb931b84
...
...
@@ -1065,13 +1065,12 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
* Find a free block at least as large as the requested size, and make sure
* the requested size is committed.
*/
static
ARENA_FREE
*
HEAP_FindFreeBlock
(
HEAP
*
heap
,
SIZE_T
size
,
SUBHEAP
**
ppSubHeap
)
static
ARENA_FREE
*
HEAP_FindFreeBlock
(
HEAP
*
heap
,
SIZE_T
data_size
,
SUBHEAP
**
ppSubHeap
)
{
SUBHEAP
*
subheap
;
struct
list
*
ptr
;
SIZE_T
total_size
;
FREE_LIST_ENTRY
*
pEntry
=
heap
->
freeList
+
get_freelist_index
(
size
+
sizeof
(
ARENA_INUSE
)
);
FREE_LIST_ENTRY
*
pEntry
=
heap
->
freeList
+
get_freelist_index
(
data_
size
+
sizeof
(
ARENA_INUSE
)
);
/* Find a suitable free list, and in it find a block large enough */
...
...
@@ -1081,10 +1080,10 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
ARENA_FREE
*
pArena
=
LIST_ENTRY
(
ptr
,
ARENA_FREE
,
entry
);
SIZE_T
arena_size
=
(
pArena
->
size
&
ARENA_SIZE_MASK
)
+
sizeof
(
ARENA_FREE
)
-
sizeof
(
ARENA_INUSE
);
if
(
arena_size
>=
size
)
if
(
arena_size
>=
data_
size
)
{
subheap
=
find_subheap
(
heap
,
(
struct
block
*
)
pArena
,
FALSE
);
if
(
!
HEAP_Commit
(
subheap
,
(
ARENA_INUSE
*
)
pArena
,
size
))
return
NULL
;
if
(
!
HEAP_Commit
(
subheap
,
(
ARENA_INUSE
*
)
pArena
,
data_
size
))
return
NULL
;
*
ppSubHeap
=
subheap
;
return
pArena
;
}
...
...
@@ -1094,7 +1093,7 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
if
(
!
(
heap
->
flags
&
HEAP_GROWABLE
))
{
WARN
(
"Not enough space in heap %p for %08lx bytes
\n
"
,
heap
,
size
);
WARN
(
"Not enough space in heap %p for %08lx bytes
\n
"
,
heap
,
data_
size
);
return
NULL
;
}
/* make sure that we have a big enough size *committed* to fit another
...
...
@@ -1102,8 +1101,8 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
* So just one heap struct, one first free arena which will eventually
* get used, and a second free arena that might get assigned all remaining
* free space in shrink_used_block() */
total_size
=
size
+
ROUND_SIZE
(
sizeof
(
SUBHEAP
))
+
sizeof
(
ARENA_INUSE
)
+
sizeof
(
ARENA_FREE
);
if
(
total_size
<
size
)
return
NULL
;
/* overflow */
total_size
=
data_
size
+
ROUND_SIZE
(
sizeof
(
SUBHEAP
))
+
sizeof
(
ARENA_INUSE
)
+
sizeof
(
ARENA_FREE
);
if
(
total_size
<
data_
size
)
return
NULL
;
/* overflow */
if
((
subheap
=
HEAP_CreateSubHeap
(
heap
,
NULL
,
heap
->
flags
,
total_size
,
max
(
heap
->
grow_size
,
total_size
)
)))
...
...
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