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
789c1db1
Commit
789c1db1
authored
Apr 27, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Allocate TEBs and stacks in the low 2G.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6a9e1934
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
virtual.c
dlls/ntdll/unix/virtual.c
+4
-4
No files found.
dlls/ntdll/unix/virtual.c
View file @
789c1db1
...
...
@@ -2907,7 +2907,7 @@ TEB *virtual_alloc_first_teb(void)
exit
(
1
);
}
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
teb_block
,
0
,
&
total
,
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
teb_block
,
is_win64
?
0x7fffffff
:
0
,
&
total
,
MEM_RESERVE
|
MEM_TOP_DOWN
,
PAGE_READWRITE
);
teb_block_pos
=
30
;
ptr
=
(
char
*
)
teb_block
+
30
*
block_size
;
...
...
@@ -2944,8 +2944,8 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
{
SIZE_T
total
=
32
*
block_size
;
if
((
status
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
ptr
,
0
,
&
total
,
MEM_RESERVE
,
PAGE_READWRITE
)))
if
((
status
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
ptr
,
is_win64
?
0x7fffffff
:
0
,
&
total
,
MEM_RESERVE
,
PAGE_READWRITE
)))
{
server_leave_uninterrupted_section
(
&
virtual_mutex
,
&
sigset
);
return
status
;
...
...
@@ -3060,7 +3060,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_size, SI
server_enter_uninterrupted_section
(
&
virtual_mutex
,
&
sigset
);
if
((
status
=
map_view
(
&
view
,
NULL
,
size
+
extra_size
,
FALSE
,
VPROT_READ
|
VPROT_WRITE
|
VPROT_COMMITTED
,
0
))
!=
STATUS_SUCCESS
)
VPROT_READ
|
VPROT_WRITE
|
VPROT_COMMITTED
,
33
))
!=
STATUS_SUCCESS
)
goto
done
;
#ifdef VALGRIND_STACK_REGISTER
...
...
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