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
ac531963
Commit
ac531963
authored
Jan 08, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe: Retrieve the page size from ntdll.
parent
90e90e3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
global.c
dlls/krnl386.exe16/global.c
+4
-1
int31.c
dlls/krnl386.exe16/int31.c
+10
-4
toolhelp.c
dlls/toolhelp.dll16/toolhelp.c
+3
-1
No files found.
dlls/krnl386.exe16/global.c
View file @
ac531963
...
...
@@ -963,9 +963,12 @@ WORD WINAPI GlobalHandleToSel16( HGLOBAL16 handle )
*/
DWORD
WINAPI
GetFreeMemInfo16
(
void
)
{
SYSTEM_BASIC_INFORMATION
info
;
MEMORYSTATUS
status
;
NtQuerySystemInformation
(
SystemBasicInformation
,
&
info
,
sizeof
(
info
),
NULL
);
GlobalMemoryStatus
(
&
status
);
return
MAKELONG
(
status
.
dwTotalVirtual
/
getpagesize
(),
status
.
dwAvailVirtual
/
getpagesize
()
);
return
MAKELONG
(
status
.
dwTotalVirtual
/
info
.
PageSize
,
status
.
dwAvailVirtual
/
info
.
PageSize
);
}
/***********************************************************************
...
...
dlls/krnl386.exe16/int31.c
View file @
ac531963
...
...
@@ -1312,6 +1312,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
TRACE
(
"get free memory information
\n
"
);
{
MEMORYSTATUS
status
;
SYSTEM_BASIC_INFORMATION
sbi
;
/* the layout is just the same as MEMMANINFO, but without
* the dwSize entry.
...
...
@@ -1331,7 +1332,9 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
}
*
info
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Edi
);
GlobalMemoryStatus
(
&
status
);
info
->
wPageSize
=
getpagesize
();
NtQuerySystemInformation
(
SystemBasicInformation
,
&
sbi
,
sizeof
(
sbi
),
NULL
);
info
->
wPageSize
=
sbi
.
PageSize
;
info
->
dwLargestFreeBlock
=
status
.
dwAvailVirtual
;
info
->
dwMaxPagesAvailable
=
info
->
dwLargestFreeBlock
/
info
->
wPageSize
;
info
->
dwMaxPagesLockable
=
info
->
dwMaxPagesAvailable
;
...
...
@@ -1418,11 +1421,14 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
break
;
case
0x0604
:
/* Get page size */
{
SYSTEM_BASIC_INFORMATION
info
;
TRACE
(
"get pagesize
\n
"
);
SET_BX
(
context
,
HIWORD
(
getpagesize
())
);
SET_CX
(
context
,
LOWORD
(
getpagesize
())
);
NtQuerySystemInformation
(
SystemBasicInformation
,
&
info
,
sizeof
(
info
),
NULL
);
SET_BX
(
context
,
HIWORD
(
info
.
PageSize
)
);
SET_CX
(
context
,
LOWORD
(
info
.
PageSize
)
);
break
;
}
case
0x0700
:
/* Mark pages as paging candidates */
TRACE
(
"mark pages as paging candidates - ignored (no paging)
\n
"
);
break
;
...
...
dlls/toolhelp.dll16/toolhelp.c
View file @
ac531963
...
...
@@ -491,6 +491,7 @@ BOOL16 WINAPI TaskFindHandle16( TASKENTRY *lpte, HTASK16 hTask )
*/
BOOL16
WINAPI
MemManInfo16
(
MEMMANINFO
*
info
)
{
SYSTEM_BASIC_INFORMATION
sbi
;
MEMORYSTATUS
status
;
/*
...
...
@@ -498,8 +499,9 @@ BOOL16 WINAPI MemManInfo16( MEMMANINFO *info )
* _must_ provide the size in the dwSize field, this function
* (under Windows) always fills the structure and returns true.
*/
NtQuerySystemInformation
(
SystemBasicInformation
,
&
sbi
,
sizeof
(
sbi
),
NULL
);
GlobalMemoryStatus
(
&
status
);
info
->
wPageSize
=
getpagesize
()
;
info
->
wPageSize
=
sbi
.
PageSize
;
info
->
dwLargestFreeBlock
=
status
.
dwAvailVirtual
;
info
->
dwMaxPagesAvailable
=
info
->
dwLargestFreeBlock
/
info
->
wPageSize
;
info
->
dwMaxPagesLockable
=
info
->
dwMaxPagesAvailable
;
...
...
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