Add type confusion protection to the default memory provider.
This commit is contained in:
committed by
David Chisnall
parent
6dbe24da2e
commit
d56201e28d
@@ -405,5 +405,8 @@ namespace snmalloc
|
||||
* The memory provider that will be used if no other provider is explicitly
|
||||
* passed as an argument.
|
||||
*/
|
||||
inline GlobalVirtual default_memory_provider;
|
||||
inline GlobalVirtual& default_memory_provider()
|
||||
{
|
||||
return TypedSingleton<GlobalVirtual>::global;
|
||||
}
|
||||
} // namespace snmalloc
|
||||
|
||||
Reference in New Issue
Block a user