Code review feedback.

This commit is contained in:
Matthew Parkinson
2020-02-05 12:47:24 +00:00
parent bad94e80d3
commit 28658a47f0
6 changed files with 28 additions and 20 deletions

View File

@@ -32,6 +32,9 @@ int main()
{
MemoryProviderStateMixin<DefaultPal> mp;
// 28 is large enough to produce a nested allocator.
// It is also large enough for the example to run in.
// For 1MiB superslabs, SUPERSLAB_BITS + 4 is not big enough for the example.
size_t large_class = 28 - SUPERSLAB_BITS;
size_t size = 1ULL << (SUPERSLAB_BITS + large_class);
oe_base = mp.reserve<true>(large_class);

View File

@@ -45,6 +45,9 @@ int main()
MemoryProviderStateMixin<DefaultPal> mp;
// 26 is large enough to produce a nested allocator.
// It is also large enough for the example to run in.
// For 1MiB superslabs, SUPERSLAB_BITS + 2 is not big enough for the example.
size_t large_class = 26 - SUPERSLAB_BITS;
size_t size = 1ULL << (SUPERSLAB_BITS + large_class);
oe_base = mp.reserve<true>(large_class);