summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/resource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/resource.cc')
-rw-r--r--winsup/cygwin/resource.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc
index 9c949e4c0..e9121e94c 100644
--- a/winsup/cygwin/resource.cc
+++ b/winsup/cygwin/resource.cc
@@ -77,6 +77,7 @@ fill_rusage (struct rusage *r, HANDLE h)
PROCESS_MEMORY_COUNTERS pmc;
+ memset (&pmc, 0, sizeof (pmc));
if (GetProcessMemoryInfo( h, &pmc, sizeof (pmc)))
{
r->ru_maxrss += (long) (pmc.WorkingSetSize /1024);
@@ -111,8 +112,7 @@ getrusage (int intwho, struct rusage *rusage_in)
unsigned long rlim_core = RLIM_INFINITY;
-extern "C"
-int
+extern "C" int
getrlimit (int resource, struct rlimit *rlp)
{
MEMORY_BASIC_INFORMATION m;
@@ -156,8 +156,7 @@ getrlimit (int resource, struct rlimit *rlp)
return 0;
}
-extern "C"
-int
+extern "C" int
setrlimit (int resource, const struct rlimit *rlp)
{
if (check_null_invalid_struct_errno (rlp))