summaryrefslogtreecommitdiff
path: root/src/gc/env
diff options
context:
space:
mode:
Diffstat (limited to 'src/gc/env')
-rw-r--r--src/gc/env/gcenv.base.h66
-rw-r--r--src/gc/env/gcenv.ee.h9
-rw-r--r--src/gc/env/gcenv.os.h17
-rw-r--r--src/gc/env/gcenv.structs.h6
4 files changed, 27 insertions, 71 deletions
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h
index 8693bbe449..15a81d77ae 100644
--- a/src/gc/env/gcenv.base.h
+++ b/src/gc/env/gcenv.base.h
@@ -489,70 +489,4 @@ struct ADIndex
BOOL operator!=(const ADIndex& ad) const { return m_dwIndex != ad.m_dwIndex; }
};
-class AppDomain
-{
-public:
- ADIndex GetIndex() { return ADIndex(RH_DEFAULT_DOMAIN_ID); }
- BOOL IsRudeUnload() { return FALSE; }
- BOOL NoAccessToHandleTable() { return FALSE; }
- void DecNumSizedRefHandles() {}
-};
-
-class SystemDomain
-{
-public:
- static SystemDomain *System() { return NULL; }
- static AppDomain *GetAppDomainAtIndex(ADIndex /*index*/) { return (AppDomain *)-1; }
- static AppDomain *AppDomainBeingUnloaded() { return NULL; }
- AppDomain *DefaultDomain() { return NULL; }
- DWORD GetTotalNumSizedRefHandles() { return 0; }
-};
-
-class NumaNodeInfo
-{
-public:
- static bool CanEnableGCNumaAware()
- {
- // [LOCALGC TODO] enable NUMA node support
- return false;
- }
-
- static void GetGroupForProcessor(uint16_t processor_number, uint16_t * group_number, uint16_t * group_processor_number)
- {
- // [LOCALGC TODO] enable NUMA node support
- assert(!"should not be called");
- }
-
- static bool GetNumaProcessorNodeEx(PPROCESSOR_NUMBER proc_no, uint16_t * node_no)
- {
- // [LOCALGC TODO] enable NUMA node support
- assert(!"should not be called");
- return false;
- }
-};
-
-class CPUGroupInfo
-{
-public:
- static bool CanEnableGCCPUGroups()
- {
- // [LOCALGC TODO] enable CPU group support
- return false;
- }
-
- static uint32_t GetNumActiveProcessors()
- {
- // [LOCALGC TODO] enable CPU group support
- assert(!"should not be called");
- return 0;
- }
-
- static void GetGroupForProcessor(uint16_t processor_number, uint16_t * group_number, uint16_t * group_processor_number)
- {
- // [LOCALGC TODO] enable CPU group support
- assert(!"should not be called");
- }
-};
-
-
#endif // __GCENV_BASE_INCLUDED__
diff --git a/src/gc/env/gcenv.ee.h b/src/gc/env/gcenv.ee.h
index ec79877867..ebe3046b17 100644
--- a/src/gc/env/gcenv.ee.h
+++ b/src/gc/env/gcenv.ee.h
@@ -71,7 +71,7 @@ public:
static void EnableFinalization(bool foundFinalizers);
static void HandleFatalError(unsigned int exitCode);
- static bool ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj);
+ static bool ShouldFinalizeObjectForUnload(void* pDomain, Object* obj);
static bool ForceFullGCToBeBlocking();
static bool EagerFinalized(Object* obj);
static MethodTable* GetFreeObjectMethodTable();
@@ -85,6 +85,13 @@ public:
static void WalkAsyncPinnedForPromotion(Object* object, ScanContext* sc, promote_func* callback);
static void WalkAsyncPinned(Object* object, void* context, void(*callback)(Object*, Object*, void*));
static IGCToCLREventSink* EventSink();
+
+ static uint32_t GetDefaultDomainIndex();
+ static void *GetAppDomainAtIndex(uint32_t appDomainIndex);
+ static bool AppDomainCanAccessHandleTable(uint32_t appDomainID);
+ static uint32_t GetIndexOfAppDomainBeingUnloaded();
+ static uint32_t GetTotalNumSizedRefHandles();
+ static bool GCToEEInterface::AppDomainIsRudeUnload(void *appDomain);
};
#endif // __GCENV_EE_H__
diff --git a/src/gc/env/gcenv.os.h b/src/gc/env/gcenv.os.h
index 41e46f8f0f..35515de280 100644
--- a/src/gc/env/gcenv.os.h
+++ b/src/gc/env/gcenv.os.h
@@ -18,6 +18,8 @@
#undef Sleep
#endif // Sleep
+#define NUMA_NODE_UNDEFINED UINT32_MAX
+
// Critical section used by the GC
class CLRCriticalSection
{
@@ -194,7 +196,7 @@ public:
// size - size of the virtual memory range
// Return:
// true if it has succeeded, false if it has failed
- static bool VirtualCommit(void *address, size_t size);
+ static bool VirtualCommit(void *address, size_t size, uint32_t node = NUMA_NODE_UNDEFINED);
// Decomit virtual memory range.
// Parameters:
@@ -391,6 +393,19 @@ public:
// Return:
// Number of processors on the machine
static uint32_t GetTotalProcessorCount();
+
+ // Is NUMA support available
+ static bool CanEnableGCNumaAware();
+
+ // Gets the NUMA node for the processor
+ static bool GetNumaProcessorNode(PPROCESSOR_NUMBER proc_no, uint16_t *node_no);
+
+ // Are CPU groups enabled
+ static bool CanEnableGCCPUGroups();
+
+ // Get the CPU group for the specified processor
+ static void GetGroupForProcessor(uint16_t processor_number, uint16_t* group_number, uint16_t* group_processor_number);
+
};
#endif // __GCENV_OS_H__
diff --git a/src/gc/env/gcenv.structs.h b/src/gc/env/gcenv.structs.h
index bb503e36e8..4f51ad0d9e 100644
--- a/src/gc/env/gcenv.structs.h
+++ b/src/gc/env/gcenv.structs.h
@@ -9,9 +9,9 @@
struct GCSystemInfo
{
- uint32_t dwNumberOfProcessors;
- uint32_t dwPageSize;
- uint32_t dwAllocationGranularity;
+ uint32_t dwNumberOfProcessors;
+ uint32_t dwPageSize;
+ uint32_t dwAllocationGranularity;
};
typedef void * HANDLE;