diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2016-03-03 11:51:59 -0800 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2016-03-03 11:51:59 -0800 |
commit | e2df0fdbfaa688de075f020a1bf59e30fffe9fb9 (patch) | |
tree | 5611fcf0839efa44e52bff4d18a58eed852329b4 /src/vm | |
parent | a70b732323b8be45a80fcd1488d60c7baa9ab0a3 (diff) | |
download | coreclr-e2df0fdbfaa688de075f020a1bf59e30fffe9fb9.tar.gz coreclr-e2df0fdbfaa688de075f020a1bf59e30fffe9fb9.tar.bz2 coreclr-e2df0fdbfaa688de075f020a1bf59e30fffe9fb9.zip |
Refactor Utilcode's IAllocators.
- `DefaultAllocator` has been replaced with `HostAllocator` in RyuJIT, which
uses the JIT hosting interface to allocate and free memory.
- The definition of `DefaultAllocator` has been moved into its own file, as it
remains in use by the interpreter and the binder.
- `ProcessHeapAllocator` has been moved into JIT32, as that was its only
remaining user.
- `AllowZeroAllocator`'s static field has been changed to an instance field
to avoid the need to define storage for the static field in Utilcode.
[tfs-changeset: 1581242]
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/interpreter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/interpreter.cpp b/src/vm/interpreter.cpp index a846e424df..bdfa9622f9 100644 --- a/src/vm/interpreter.cpp +++ b/src/vm/interpreter.cpp @@ -23,6 +23,7 @@ #include "runtimehandles.h" #include "vars.hpp" #include "cycletimer.h" +#include "defaultallocator.h" #ifdef FEATURE_REMOTING #include "remoting.h" #endif @@ -10837,7 +10838,7 @@ Interpreter::AddrToMDMap* Interpreter::GetAddrToMdMap() if (s_addrToMDMap == NULL) { - s_addrToMDMap = new AddrToMDMap(/* use default allocator */ NULL); + s_addrToMDMap = new AddrToMDMap(DefaultAllocator::Singleton()); } return s_addrToMDMap; } @@ -10899,7 +10900,7 @@ Interpreter::MethodHandleToInterpMethInfoPtrMap* Interpreter::GetMethodHandleToI if (s_methodHandleToInterpMethInfoPtrMap == NULL) { - s_methodHandleToInterpMethInfoPtrMap = new MethodHandleToInterpMethInfoPtrMap(/* use default allocator */ NULL); + s_methodHandleToInterpMethInfoPtrMap = new MethodHandleToInterpMethInfoPtrMap(DefaultAllocator::Singleton()); } return s_methodHandleToInterpMethInfoPtrMap; } |