Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7aa04f27
Commit
7aa04f27
authored
Feb 26, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
Feb 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented GlobalMemoryStatusEx().
parent
37f08173
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletion
+48
-1
kernel32.spec
dlls/kernel/kernel32.spec
+1
-1
winbase.h
include/winbase.h
+12
-0
global.c
memory/global.c
+35
-0
No files found.
dlls/kernel/kernel32.spec
View file @
7aa04f27
...
...
@@ -533,7 +533,7 @@
@ stdcall GlobalHandle(ptr) GlobalHandle
@ stdcall GlobalLock(long) GlobalLock
@ stdcall GlobalMemoryStatus(ptr) GlobalMemoryStatus
@ st
ub
GlobalMemoryStatusEx
@ st
dcall GlobalMemoryStatusEx(ptr)
GlobalMemoryStatusEx
@ stdcall GlobalReAlloc(long long long) GlobalReAlloc
@ stdcall GlobalSize(long) GlobalSize
@ stdcall GlobalUnWire(long) GlobalUnWire
...
...
include/winbase.h
View file @
7aa04f27
...
...
@@ -460,6 +460,18 @@ typedef struct tagMEMORYSTATUS
SIZE_T
dwAvailVirtual
;
}
MEMORYSTATUS
,
*
LPMEMORYSTATUS
;
typedef
struct
tagMEMORYSTATUSEX
{
DWORD
dwLength
;
DWORD
dwMemoryLoad
;
DWORDLONG
ullTotalPhys
;
DWORDLONG
ullAvailPhys
;
DWORDLONG
ullTotalPageFile
;
DWORDLONG
ullAvailPageFile
;
DWORDLONG
ullTotalVirtual
;
DWORDLONG
ullAvailVirtual
;
DWORDLONG
ullAvailExtendedVirtual
;
}
MEMORYSTATUSEX
,
*
LPMEMORYSTATUSEX
;
typedef
struct
_SYSTEMTIME
{
WORD
wYear
;
...
...
memory/global.c
View file @
7aa04f27
...
...
@@ -1558,6 +1558,9 @@ SIZE_T WINAPI GlobalCompact( DWORD minfree )
/***********************************************************************
* GlobalMemoryStatus (KERNEL32.@)
* Provides information about the status of the memory, so apps can tell
* roughly how much they are able to allocate
*
* RETURNS
* None
*/
...
...
@@ -1693,6 +1696,38 @@ VOID WINAPI GlobalMemoryStatus(
}
/***********************************************************************
* GlobalMemoryStatusEx (KERNEL32.@)
* A version of GlobalMemoryStatus that can deal with memory over 4GB
*
* RETURNS
* None
*/
BOOL
WINAPI
GlobalMemoryStatusEx
(
LPMEMORYSTATUSEX
lpBuffer
)
{
MEMORYSTATUS
memstatus
;
/* Because GlobalMemoryStatusEx is identical to GlobalMemoryStatus save
for one extra field in the struct, and the lack of a bug, we simply
call GlobalMemoryStatus and copy the values across. */
FIXME
(
"we should emulate the 4GB bug here, as per MSDN
\n
"
);
GlobalMemoryStatus
(
&
memstatus
);
lpBuffer
->
dwMemoryLoad
=
memstatus
.
dwMemoryLoad
;
lpBuffer
->
ullTotalPhys
=
memstatus
.
dwTotalPhys
;
lpBuffer
->
ullAvailPhys
=
memstatus
.
dwAvailPhys
;
lpBuffer
->
ullTotalPageFile
=
memstatus
.
dwTotalPageFile
;
lpBuffer
->
ullAvailPageFile
=
memstatus
.
dwAvailPageFile
;
lpBuffer
->
ullTotalVirtual
=
memstatus
.
dwTotalVirtual
;
lpBuffer
->
ullAvailVirtual
=
memstatus
.
dwAvailVirtual
;
/* MSDN says about AvailExtendedVirtual: Size of unreserved and uncommitted
memory in the extended portion of the virtual address space of the calling
process, in bytes.
However, I don't know what this means, so set it to zero :(
*/
lpBuffer
->
ullAvailExtendedVirtual
=
0
;
return
1
;
}
/***********************************************************************
* A20Proc (KERNEL.165)
* A20_Proc (SYSTEM.20)
*/
...
...
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