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
4c3cc858
Commit
4c3cc858
authored
May 04, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store the block size directly in block headers.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
86b2ca98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
heap.c
dlls/ntdll/heap.c
+1
-7
No files found.
dlls/ntdll/heap.c
View file @
4c3cc858
...
...
@@ -253,17 +253,11 @@ static inline UINT block_get_overhead( const struct block *block )
/* return the size of a block, including its header */
static
inline
UINT
block_get_size
(
const
struct
block
*
block
)
{
UINT
data_size
=
block
->
size
&
ARENA_SIZE_MASK
,
size
=
data_size
;
if
(
block_get_flags
(
block
)
&
ARENA_FLAG_FREE
)
size
+=
sizeof
(
struct
entry
);
else
size
+=
sizeof
(
*
block
);
if
(
size
<
data_size
)
return
~
0u
;
return
size
;
return
block
->
size
&
ARENA_SIZE_MASK
;
}
static
inline
void
block_set_size
(
struct
block
*
block
,
UINT
flags
,
UINT
block_size
)
{
if
(
flags
&
ARENA_FLAG_FREE
)
block_size
-=
sizeof
(
struct
entry
);
else
block_size
-=
sizeof
(
*
block
);
block
->
size
=
(
block_size
&
ARENA_SIZE_MASK
)
|
(
flags
&
~
ARENA_SIZE_MASK
);
}
...
...
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