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
ea5924c0
Commit
ea5924c0
authored
Oct 28, 2000
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return the correct value for dwTotalVirtual.
Return a more plausible value for dwAvailVirtual.
parent
bec545ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
global.c
memory/global.c
+9
-6
No files found.
memory/global.c
View file @
ea5924c0
...
...
@@ -1501,6 +1501,7 @@ VOID WINAPI GlobalMemoryStatus(
)
{
static
MEMORYSTATUS
cached_memstatus
;
static
int
cache_lastchecked
=
0
;
SYSTEM_INFO
si
;
#ifdef linux
FILE
*
f
;
#endif
...
...
@@ -1553,10 +1554,10 @@ VOID WINAPI GlobalMemoryStatus(
if
(
lpmem
->
dwTotalPhys
)
{
lpmem
->
dwTotalVirtu
al
=
lpmem
->
dwTotalPhys
+
lpmem
->
dwTotalPageFile
;
lpmem
->
dwAvailVirtu
al
=
lpmem
->
dwAvailPhys
+
lpmem
->
dwAvailPageFile
;
lpmem
->
dwMemoryLoad
=
(
lpmem
->
dwTotalVirtual
-
lpmem
->
dwAvailVirtu
al
)
/
(
lpmem
->
dwTotalVirtu
al
/
100
);
DWORD
TotalPhysic
al
=
lpmem
->
dwTotalPhys
+
lpmem
->
dwTotalPageFile
;
DWORD
AvailPhysic
al
=
lpmem
->
dwAvailPhys
+
lpmem
->
dwAvailPageFile
;
lpmem
->
dwMemoryLoad
=
(
TotalPhysical
-
AvailPhysic
al
)
/
(
TotalPhysic
al
/
100
);
}
}
else
#endif
...
...
@@ -1567,9 +1568,11 @@ VOID WINAPI GlobalMemoryStatus(
lpmem
->
dwAvailPhys
=
16
*
1024
*
1024
;
lpmem
->
dwTotalPageFile
=
16
*
1024
*
1024
;
lpmem
->
dwAvailPageFile
=
16
*
1024
*
1024
;
lpmem
->
dwTotalVirtual
=
32
*
1024
*
1024
;
lpmem
->
dwAvailVirtual
=
32
*
1024
*
1024
;
}
GetSystemInfo
(
&
si
);
lpmem
->
dwTotalVirtual
=
si
.
lpMaximumApplicationAddress
-
si
.
lpMinimumApplicationAddress
;
/* FIXME: we should track down all the already allocated VM pages and substract them, for now arbitrarily remove 64KB so that it matches NT */
lpmem
->
dwAvailVirtual
=
lpmem
->
dwTotalVirtual
-
64
*
1024
;
memcpy
(
&
cached_memstatus
,
lpmem
,
sizeof
(
MEMORYSTATUS
));
}
...
...
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