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
66036eff
Commit
66036eff
authored
May 04, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Merge HEAP_InsertFreeBlock with create_free_block.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
47e5a0bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
heap.c
dlls/ntdll/heap.c
+4
-24
No files found.
dlls/ntdll/heap.c
View file @
66036eff
...
...
@@ -595,28 +595,6 @@ static HEAP *HEAP_GetPtr(
}
/***********************************************************************
* HEAP_InsertFreeBlock
*
* Insert a free block into the free list.
*/
static
inline
void
HEAP_InsertFreeBlock
(
HEAP
*
heap
,
ARENA_FREE
*
pArena
,
BOOL
last
)
{
SIZE_T
block_size
=
(
pArena
->
size
&
ARENA_SIZE_MASK
)
+
sizeof
(
*
pArena
);
struct
entry
*
list
=
find_free_list
(
heap
,
block_size
,
last
);
if
(
last
)
{
/* insert at end of free list, i.e. before the next free list entry */
list_add_before
(
&
list
->
entry
,
&
pArena
->
entry
);
}
else
{
/* insert at head of free list */
list_add_after
(
&
list
->
entry
,
&
pArena
->
entry
);
}
}
static
SUBHEAP
*
find_subheap
(
const
HEAP
*
heap
,
const
struct
block
*
block
,
BOOL
heap_walk
)
{
SUBHEAP
*
subheap
;
...
...
@@ -692,7 +670,7 @@ static inline BOOL HEAP_Decommit( SUBHEAP *subheap, void *ptr )
static
void
create_free_block
(
SUBHEAP
*
subheap
,
struct
block
*
block
,
SIZE_T
block_size
)
{
const
char
*
end
=
(
char
*
)
block
+
block_size
,
*
commit_end
=
subheap_commit_end
(
subheap
);
struct
entry
*
entry
=
(
struct
entry
*
)
block
;
struct
entry
*
entry
=
(
struct
entry
*
)
block
,
*
list
;
HEAP
*
heap
=
subheap
->
heap
;
DWORD
flags
=
heap
->
flags
;
struct
block
*
next
;
...
...
@@ -724,7 +702,9 @@ static void create_free_block( SUBHEAP *subheap, struct block *block, SIZE_T blo
*
((
struct
block
**
)
next
-
1
)
=
block
;
}
HEAP_InsertFreeBlock
(
heap
,
entry
,
!
next
);
list
=
find_free_list
(
heap
,
block_get_size
(
block
),
!
next
);
if
(
!
next
)
list_add_before
(
&
list
->
entry
,
&
entry
->
entry
);
else
list_add_after
(
&
list
->
entry
,
&
entry
->
entry
);
}
...
...
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