Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
9bf4de22
Commit
9bf4de22
authored
Sep 28, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Moved MemManInfo16 to toolhelp16.c.
parent
2e1b87d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
29 deletions
+28
-29
global16.c
dlls/kernel32/global16.c
+3
-29
toolhelp16.c
dlls/kernel32/toolhelp16.c
+25
-0
No files found.
dlls/kernel32/global16.c
View file @
9bf4de22
...
...
@@ -1063,39 +1063,13 @@ BOOL16 WINAPI GlobalEntryModule16( GLOBALENTRY *pGlobal, HMODULE16 hModule,
/***********************************************************************
* MemManInfo (TOOLHELP.72)
*/
BOOL16
WINAPI
MemManInfo16
(
MEMMANINFO
*
info
)
{
MEMORYSTATUS
status
;
/*
* Not unsurprisingly although the documentation says you
* _must_ provide the size in the dwSize field, this function
* (under Windows) always fills the structure and returns true.
*/
GlobalMemoryStatus
(
&
status
);
info
->
wPageSize
=
getpagesize
();
info
->
dwLargestFreeBlock
=
status
.
dwAvailVirtual
;
info
->
dwMaxPagesAvailable
=
info
->
dwLargestFreeBlock
/
info
->
wPageSize
;
info
->
dwMaxPagesLockable
=
info
->
dwMaxPagesAvailable
;
info
->
dwTotalLinearSpace
=
status
.
dwTotalVirtual
/
info
->
wPageSize
;
info
->
dwTotalUnlockedPages
=
info
->
dwTotalLinearSpace
;
info
->
dwFreePages
=
info
->
dwMaxPagesAvailable
;
info
->
dwTotalPages
=
info
->
dwTotalLinearSpace
;
info
->
dwFreeLinearSpace
=
info
->
dwMaxPagesAvailable
;
info
->
dwSwapFilePages
=
status
.
dwTotalPageFile
/
info
->
wPageSize
;
return
TRUE
;
}
/***********************************************************************
* GetFreeMemInfo (KERNEL.316)
*/
DWORD
WINAPI
GetFreeMemInfo16
(
void
)
{
MEM
MANINFO
info
;
MemManInfo16
(
&
info
);
return
MAKELONG
(
info
.
dwTotalLinearSpace
,
info
.
dwMaxPagesAvailable
);
MEM
ORYSTATUS
status
;
GlobalMemoryStatus
(
&
status
);
return
MAKELONG
(
status
.
dwTotalVirtual
/
getpagesize
(),
status
.
dwAvailVirtual
/
getpagesize
()
);
}
/***********************************************************************
...
...
dlls/kernel32/toolhelp16.c
View file @
9bf4de22
...
...
@@ -64,6 +64,31 @@ BOOL16 WINAPI TaskFindHandle16( TASKENTRY *lpte, HTASK16 hTask )
return
TaskNext16
(
lpte
);
}
/***********************************************************************
* MemManInfo (TOOLHELP.72)
*/
BOOL16
WINAPI
MemManInfo16
(
MEMMANINFO
*
info
)
{
MEMORYSTATUS
status
;
/*
* Not unsurprisingly although the documentation says you
* _must_ provide the size in the dwSize field, this function
* (under Windows) always fills the structure and returns true.
*/
GlobalMemoryStatus
(
&
status
);
info
->
wPageSize
=
getpagesize
();
info
->
dwLargestFreeBlock
=
status
.
dwAvailVirtual
;
info
->
dwMaxPagesAvailable
=
info
->
dwLargestFreeBlock
/
info
->
wPageSize
;
info
->
dwMaxPagesLockable
=
info
->
dwMaxPagesAvailable
;
info
->
dwTotalLinearSpace
=
status
.
dwTotalVirtual
/
info
->
wPageSize
;
info
->
dwTotalUnlockedPages
=
info
->
dwTotalLinearSpace
;
info
->
dwFreePages
=
info
->
dwMaxPagesAvailable
;
info
->
dwTotalPages
=
info
->
dwTotalLinearSpace
;
info
->
dwFreeLinearSpace
=
info
->
dwMaxPagesAvailable
;
info
->
dwSwapFilePages
=
status
.
dwTotalPageFile
/
info
->
wPageSize
;
return
TRUE
;
}
/***********************************************************************
* NotifyRegister (TOOLHELP.73)
...
...
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