summaryrefslogtreecommitdiff
path: root/src/gc/env/gcenv.os.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gc/env/gcenv.os.h')
-rw-r--r--src/gc/env/gcenv.os.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gc/env/gcenv.os.h b/src/gc/env/gcenv.os.h
index 68646e1437..0ef979c221 100644
--- a/src/gc/env/gcenv.os.h
+++ b/src/gc/env/gcenv.os.h
@@ -224,6 +224,24 @@ public:
static bool GetCurrentProcessAffinityMask(uintptr_t *processMask, uintptr_t *systemMask);
//
+ // Support for acting on memory limit imposed on this process, eg, running in a job object on Windows.
+ //
+
+ // If the process's memory is restricted (ie, beyond what's available on the machine), return that limit.
+ // Return:
+ // non zero if it has succeeded, 0 if it has failed
+ // Remarks:
+ // If a process runs with a restricted memory limit, and we are successful at getting
+ // that limit, it returns the limit. If there's no limit specified, or there's an error
+ // at getting that limit, it returns 0.
+ static uint64_t GetRestrictedPhysicalMemoryLimit();
+
+ // Get the current physical memory this process is using.
+ // Return:
+ // non zero if it has succeeded, 0 if it has failed
+ static size_t GetCurrentPhysicalMemory();
+
+ //
// Misc
//