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
059094c1
Commit
059094c1
authored
Oct 19, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Oct 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Define heap block's BLOCK_FLAG_LFH as 0x80.
parent
3f6510c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
heap.c
dlls/ntdll/heap.c
+7
-7
No files found.
dlls/ntdll/heap.c
View file @
059094c1
...
@@ -103,12 +103,12 @@ C_ASSERT( sizeof(struct block) == 8 );
...
@@ -103,12 +103,12 @@ C_ASSERT( sizeof(struct block) == 8 );
#define BLOCK_FLAG_PREV_FREE 0x02
#define BLOCK_FLAG_PREV_FREE 0x02
#define BLOCK_FLAG_FREE_LINK 0x03
#define BLOCK_FLAG_FREE_LINK 0x03
#define BLOCK_FLAG_LARGE 0x04
#define BLOCK_FLAG_LARGE 0x04
#define BLOCK_FLAG_LFH 0x
08
/* block is handled by the LFH frontend */
#define BLOCK_FLAG_LFH 0x
80
/* block is handled by the LFH frontend */
#define BLOCK_FLAG_USER_INFO 0x
10
/* user flags up to 0xf0
*/
#define BLOCK_FLAG_USER_INFO 0x
08
/* user flags bits 3-6
*/
#define BLOCK_FLAG_USER_MASK 0x
f0
#define BLOCK_FLAG_USER_MASK 0x
78
#define BLOCK_USER_FLAGS( heap_flags ) (((heap_flags) >>
4
) & BLOCK_FLAG_USER_MASK)
#define BLOCK_USER_FLAGS( heap_flags ) (((heap_flags) >>
5
) & BLOCK_FLAG_USER_MASK)
#define HEAP_USER_FLAGS( block_flags ) (((block_flags) & BLOCK_FLAG_USER_MASK) <<
4
)
#define HEAP_USER_FLAGS( block_flags ) (((block_flags) & BLOCK_FLAG_USER_MASK) <<
5
)
/* entry to link free blocks in free lists */
/* entry to link free blocks in free lists */
...
@@ -1946,7 +1946,7 @@ static NTSTATUS heap_allocate_block_lfh( struct heap *heap, ULONG flags, SIZE_T
...
@@ -1946,7 +1946,7 @@ static NTSTATUS heap_allocate_block_lfh( struct heap *heap, ULONG flags, SIZE_T
if
((
block
=
find_free_bin_block
(
heap
,
flags
,
block_size
,
bin
)))
if
((
block
=
find_free_bin_block
(
heap
,
flags
,
block_size
,
bin
)))
{
{
block_set_type
(
block
,
BLOCK_TYPE_USED
);
block_set_type
(
block
,
BLOCK_TYPE_USED
);
block_set_flags
(
block
,
~
BLOCK_FLAG_LFH
,
BLOCK_USER_FLAGS
(
flags
)
);
block_set_flags
(
block
,
(
BYTE
)
~
BLOCK_FLAG_LFH
,
BLOCK_USER_FLAGS
(
flags
)
);
block
->
tail_size
=
block_size
-
sizeof
(
*
block
)
-
size
;
block
->
tail_size
=
block_size
-
sizeof
(
*
block
)
-
size
;
initialize_block
(
block
,
0
,
size
,
flags
);
initialize_block
(
block
,
0
,
size
,
flags
);
mark_block_tail
(
block
,
flags
);
mark_block_tail
(
block
,
flags
);
...
@@ -1971,7 +1971,7 @@ static NTSTATUS heap_free_block_lfh( struct heap *heap, ULONG flags, struct bloc
...
@@ -1971,7 +1971,7 @@ static NTSTATUS heap_free_block_lfh( struct heap *heap, ULONG flags, struct bloc
i
=
block_get_group_index
(
block
);
i
=
block_get_group_index
(
block
);
valgrind_make_writable
(
block
,
sizeof
(
*
block
)
);
valgrind_make_writable
(
block
,
sizeof
(
*
block
)
);
block_set_type
(
block
,
BLOCK_TYPE_FREE
);
block_set_type
(
block
,
BLOCK_TYPE_FREE
);
block_set_flags
(
block
,
~
BLOCK_FLAG_LFH
,
BLOCK_FLAG_FREE
);
block_set_flags
(
block
,
(
BYTE
)
~
BLOCK_FLAG_LFH
,
BLOCK_FLAG_FREE
);
mark_block_free
(
block
+
1
,
(
char
*
)
block
+
block_size
-
(
char
*
)(
block
+
1
),
flags
);
mark_block_free
(
block
+
1
,
(
char
*
)
block
+
block_size
-
(
char
*
)(
block
+
1
),
flags
);
/* if this was the last used block in a group and GROUP_FLAG_FREE was set */
/* if this was the last used block in a group and GROUP_FLAG_FREE was set */
...
...
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