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
9b7c94bc
Commit
9b7c94bc
authored
Feb 16, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Feb 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use sysctl(VM_SWAPUSAGE) to get swap sizes on BSDs, if available.
parent
95df19ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
heap.c
dlls/kernel32/heap.c
+14
-0
No files found.
dlls/kernel32/heap.c
View file @
9b7c94bc
...
...
@@ -1158,6 +1158,9 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
#ifdef HW_MEMSIZE
uint64_t
val64
;
#endif
#ifdef VM_SWAPUSAGE
struct
xsw_usage
swap
;
#endif
#elif defined(sun)
unsigned
long
pagesize
,
maxpages
,
freepages
,
swapspace
,
swapfree
;
struct
anoninfo
swapinf
;
...
...
@@ -1253,6 +1256,17 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
lpmemex
->
ullTotalPageFile
=
lpmemex
->
ullAvailPhys
;
lpmemex
->
ullAvailPageFile
=
lpmemex
->
ullAvailPhys
;
#ifdef VM_SWAPUSAGE
mib
[
0
]
=
CTL_VM
;
mib
[
1
]
=
VM_SWAPUSAGE
;
size_sys
=
sizeof
(
swap
);
if
(
!
sysctl
(
mib
,
2
,
&
swap
,
&
size_sys
,
NULL
,
0
)
&&
size_sys
==
sizeof
(
swap
))
{
lpmemex
->
ullTotalPageFile
=
swap
.
xsu_total
;
lpmemex
->
ullAvailPageFile
=
swap
.
xsu_avail
;
}
#endif
#elif defined ( sun )
pagesize
=
sysconf
(
_SC_PAGESIZE
);
maxpages
=
sysconf
(
_SC_PHYS_PAGES
);
...
...
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