2015-09-28 11:08:50 +02:00
|
|
|
/*
|
2018-02-23 09:53:12 +01:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2015-09-28 11:08:50 +02:00
|
|
|
*
|
2016-06-27 14:56:38 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 09:53:12 +01:00
|
|
|
*
|
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
|
|
* information regarding copyright ownership.
|
2015-09-28 11:08:50 +02:00
|
|
|
*/
|
|
|
|
|
2018-03-28 14:19:37 +02:00
|
|
|
#include <inttypes.h>
|
2015-09-28 11:08:50 +02:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <isc/meminfo.h>
|
|
|
|
|
2018-03-28 14:19:37 +02:00
|
|
|
uint64_t
|
2015-09-28 11:08:50 +02:00
|
|
|
isc_meminfo_totalphys(void) {
|
|
|
|
MEMORYSTATUSEX statex;
|
2015-09-28 17:30:07 +02:00
|
|
|
|
|
|
|
statex.dwLength = sizeof(statex);
|
2015-09-28 11:08:50 +02:00
|
|
|
GlobalMemoryStatusEx(&statex);
|
2018-03-28 14:19:37 +02:00
|
|
|
return ((uint64_t)statex.ullTotalPhys);
|
2015-09-28 14:50:18 +02:00
|
|
|
}
|