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
c9cf44a3
Commit
c9cf44a3
authored
Nov 09, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a get_free_list_block_size() helper.
parent
f810a575
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
heap.c
dlls/ntdll/heap.c
+8
-6
No files found.
dlls/ntdll/heap.c
View file @
c9cf44a3
...
...
@@ -488,26 +488,28 @@ static void heap_set_status( const struct heap *heap, ULONG flags, NTSTATUS stat
if
(
status
)
RtlSetLastWin32ErrorAndNtStatusFromNtStatus
(
status
);
}
static
size_t
get_free_list_block_size
(
unsigned
int
index
)
{
if
(
index
<
HEAP_NB_SMALL_FREE_LISTS
)
return
index
*
ALIGNMENT
+
HEAP_MIN_BLOCK_SIZE
;
return
free_list_sizes
[
index
-
HEAP_NB_SMALL_FREE_LISTS
];
}
static
void
heap_dump
(
const
struct
heap
*
heap
)
{
const
struct
block
*
block
;
const
ARENA_LARGE
*
large
;
const
SUBHEAP
*
subheap
;
unsigned
int
i
;
SIZE_T
size
;
TRACE
(
"heap: %p
\n
"
,
heap
);
TRACE
(
" next %p
\n
"
,
LIST_ENTRY
(
heap
->
entry
.
next
,
struct
heap
,
entry
)
);
TRACE
(
" free_lists: %p
\n
"
,
heap
->
free_lists
);
for
(
i
=
0
;
i
<
HEAP_NB_FREE_LISTS
;
i
++
)
{
if
(
i
<
HEAP_NB_SMALL_FREE_LISTS
)
size
=
HEAP_MIN_BLOCK_SIZE
+
i
*
ALIGNMENT
;
else
size
=
free_list_sizes
[
i
-
HEAP_NB_SMALL_FREE_LISTS
];
TRACE
(
" %p: size %8Ix, prev %p, next %p
\n
"
,
heap
->
free_lists
+
i
,
size
,
TRACE
(
" %p: size %8Ix, prev %p, next %p
\n
"
,
heap
->
free_lists
+
i
,
get_free_list_block_size
(
i
),
LIST_ENTRY
(
heap
->
free_lists
[
i
].
entry
.
prev
,
struct
entry
,
entry
),
LIST_ENTRY
(
heap
->
free_lists
[
i
].
entry
.
next
,
struct
entry
,
entry
)
);
}
TRACE
(
" subheaps: %p
\n
"
,
&
heap
->
subheap_list
);
LIST_FOR_EACH_ENTRY
(
subheap
,
&
heap
->
subheap_list
,
SUBHEAP
,
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