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
7d1ffb56
Commit
7d1ffb56
authored
Mar 15, 2007
by
Fabian Bieler
Committed by
Alexandre Julliard
Mar 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: GlobalMemoryStatusEx: memory usage reported only reflects physical memory.
parent
bd07f3f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
heap.c
dlls/kernel32/heap.c
+6
-10
No files found.
dlls/kernel32/heap.c
View file @
7d1ffb56
...
...
@@ -1262,14 +1262,6 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
lpmemex
->
ullAvailPhys
+=
cached
*
1024
;
}
fclose
(
f
);
if
(
lpmemex
->
ullTotalPhys
)
{
DWORDLONG
TotalPhysical
=
lpmemex
->
ullTotalPhys
+
lpmemex
->
ullTotalPageFile
;
DWORDLONG
AvailPhysical
=
lpmemex
->
ullAvailPhys
+
lpmemex
->
ullAvailPageFile
;
lpmemex
->
dwMemoryLoad
=
(
TotalPhysical
-
AvailPhysical
)
/
(
TotalPhysical
/
100
);
}
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__)
mib
[
0
]
=
CTL_HW
;
...
...
@@ -1284,7 +1276,6 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
lpmemex
->
ullAvailPhys
=
val
;
lpmemex
->
ullTotalPageFile
=
val
;
lpmemex
->
ullAvailPageFile
=
val
;
lpmemex
->
dwMemoryLoad
=
lpmemex
->
ullTotalPhys
-
lpmemex
->
ullAvailPhys
;
#elif defined ( sun )
pagesize
=
sysconf
(
_SC_PAGESIZE
);
maxpages
=
sysconf
(
_SC_PHYS_PAGES
);
...
...
@@ -1305,9 +1296,14 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
lpmemex
->
ullAvailPhys
=
pagesize
*
freepages
;
lpmemex
->
ullTotalPageFile
=
swapspace
;
lpmemex
->
ullAvailPageFile
=
swapfree
;
lpmemex
->
dwMemoryLoad
=
lpmemex
->
ullTotalPhys
-
lpmemex
->
ullAvailPhys
;
#endif
if
(
lpmemex
->
ullTotalPhys
)
{
lpmemex
->
dwMemoryLoad
=
(
lpmemex
->
ullTotalPhys
-
lpmemex
->
ullAvailPhys
)
/
(
lpmemex
->
ullTotalPhys
/
100
);
}
/* Project2k refuses to start if it sees less than 1Mb of free swap */
if
(
lpmemex
->
ullTotalPageFile
<
lpmemex
->
ullTotalPhys
)
lpmemex
->
ullTotalPageFile
=
lpmemex
->
ullTotalPhys
;
...
...
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