summaryrefslogtreecommitdiff
path: root/public/tier0/systeminformation.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/tier0/systeminformation.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/tier0/systeminformation.h')
-rw-r--r--public/tier0/systeminformation.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/public/tier0/systeminformation.h b/public/tier0/systeminformation.h
new file mode 100644
index 0000000..f9ba59e
--- /dev/null
+++ b/public/tier0/systeminformation.h
@@ -0,0 +1,56 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+
+#ifndef SYSTEMINFORMATION_H
+#define SYSTEMINFORMATION_H
+
+#ifdef _WIN32
+ #pragma once
+#endif
+
+#ifndef PLATFORM_INTERFACE
+ #define PLATFORM_INTERFACE
+#endif
+
+//
+// Defines a possible outcome of a system call
+//
+enum SYSTEM_CALL_RESULT_t
+{
+ SYSCALL_SUCCESS = 0, // System call succeeded
+ SYSCALL_FAILED = 1, // System call failed
+ SYSCALL_NOPROC = 2, // Failed to find required system procedure
+ SYSCALL_NODLL = 3, // Failed to find or load required system module
+ SYSCALL_UNSUPPORTED = 4, // System call unsupported on the OS
+};
+
+
+//
+// Information about paged pool memory
+//
+struct PAGED_POOL_INFO_t
+{
+ unsigned long numPagesUsed; // Number of Paged Pool pages used
+ unsigned long numPagesFree; // Number of Paged Pool pages free
+};
+
+//
+// Plat_GetMemPageSize
+// Returns the size of a memory page in kilobytes.
+//
+PLATFORM_INTERFACE unsigned long Plat_GetMemPageSize();
+
+//
+// Plat_GetPagedPoolInfo
+// Fills in the paged pool info structure if successful.
+//
+PLATFORM_INTERFACE SYSTEM_CALL_RESULT_t Plat_GetPagedPoolInfo( PAGED_POOL_INFO_t *pPPI );
+
+
+
+#endif // #ifndef SYSTEMINFORMATION_H