MemoryProviderStateMixin is not a PAL

This commit is contained in:
Nathaniel Filardo
2020-09-07 11:57:38 +01:00
committed by Matthew Parkinson
parent d79a8184af
commit 1e8d0bd743
5 changed files with 26 additions and 27 deletions

View File

@@ -98,17 +98,17 @@ void reduce_pressure(Queue& allocations)
* Template parameter required to handle `if constexpr` always evaluating both
* sides.
*/
template<typename PAL>
template<typename MemoryProvider>
void register_for_pal_notifications()
{
PAL::register_for_low_memory_callback(&update_epoch);
MemoryProvider::Pal::register_for_low_memory_callback(&update_epoch);
}
int main(int argc, char** argv)
{
opt::Opt opt(argc, argv);
if constexpr (pal_supports<LowMemoryNotification, GlobalVirtual>)
if constexpr (pal_supports<LowMemoryNotification, GlobalVirtual::Pal>)
{
register_for_pal_notifications<GlobalVirtual>();
}