Refactor interface between backend and frontend (#530)
* Rename to use Config, rather than StateHandle/Globals/Backend * Make Backend a type on Config that contains the address space management implementation * Make Ranges part of the Backend configuration, so we can reuse code for different ways of managing memory * Pull the common chains of range definitions into separate files for reuse. * Move PagemapEntry to CommonConfig * Expose Pagemap through backend, so frontend doesn't see Pagemap directly * Remove global Pal and use DefaultPal, where one is not pass explicitly. Co-authored-by: David Chisnall <davidchisnall@users.noreply.github.com> Co-authored-by: Nathaniel Filardo <105816689+nwf-msr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1b8aa6bc0d
commit
03c9da6aa4
@@ -154,7 +154,7 @@ void test_tasks(size_t num_tasks, size_t count, size_t size)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
snmalloc::debug_check_empty<Globals>();
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace test
|
||||
{
|
||||
size_t rand = (size_t)r.next();
|
||||
size_t offset = bits::clz(rand);
|
||||
if constexpr (Pal::address_bits > 32)
|
||||
if constexpr (DefaultPal::address_bits > 32)
|
||||
{
|
||||
if (offset > 30)
|
||||
offset = 30;
|
||||
@@ -47,7 +47,7 @@ namespace test
|
||||
alloc.dealloc(objects[i]);
|
||||
}
|
||||
|
||||
snmalloc::debug_check_empty<Globals>();
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
}
|
||||
|
||||
void test_external_pointer(xoroshiro::p128r64& r)
|
||||
|
||||
@@ -60,7 +60,7 @@ void test_alloc_dealloc(size_t count, size_t size, bool write)
|
||||
}
|
||||
}
|
||||
|
||||
snmalloc::debug_check_empty<Globals>();
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
||||
Reference in New Issue
Block a user