summaryrefslogtreecommitdiff
path: root/src/inc/simplerhash.inl
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-03-03 11:51:59 -0800
committerPat Gavlin <pagavlin@microsoft.com>2016-03-03 11:51:59 -0800
commite2df0fdbfaa688de075f020a1bf59e30fffe9fb9 (patch)
tree5611fcf0839efa44e52bff4d18a58eed852329b4 /src/inc/simplerhash.inl
parenta70b732323b8be45a80fcd1488d60c7baa9ab0a3 (diff)
downloadcoreclr-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/inc/simplerhash.inl')
-rw-r--r--src/inc/simplerhash.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inc/simplerhash.inl b/src/inc/simplerhash.inl
index 1a7d004b26..091f047311 100644
--- a/src/inc/simplerhash.inl
+++ b/src/inc/simplerhash.inl
@@ -51,7 +51,7 @@ SimplerHashTable<Key,KeyFuncs,Value,Behavior>::SimplerHashTable(IAllocator* allo
{
LIMITED_METHOD_CONTRACT;
- if (m_alloc == NULL) m_alloc = DefaultAllocator::Singleton();
+ assert(m_alloc != nullptr);
#ifndef __GNUC__ // these crash GCC
static_assert_no_msg(Behavior::s_growth_factor_numerator > Behavior::s_growth_factor_denominator);