Fix callers of renamed function.

This commit is contained in:
David Chisnall
2019-04-11 10:42:50 +01:00
parent a64cc5562f
commit 9d24f7e24f
2 changed files with 5 additions and 5 deletions

View File

@@ -138,7 +138,7 @@ namespace snmalloc
{
const snmalloc::PagemapConfig* c;
external_pagemap =
SuperslabPagemap::cast_to_pagemap(snmalloc_get_global_pagemap(&c), c);
SuperslabPagemap::cast_to_pagemap(snmalloc_pagemap_global_get(&c), c);
// FIXME: Report an error somehow in non-debug builds.
assert(external_pagemap);
}

View File

@@ -33,9 +33,9 @@ extern "C" void* enclave_malloc(size_t);
extern "C" void enclave_free(void*);
extern "C" void*
enclave_snmalloc_get_global_pagemap(snmalloc::PagemapConfig const**);
enclave_snmalloc_pagemap_global_get(snmalloc::PagemapConfig const**);
extern "C" void*
host_snmalloc_get_global_pagemap(snmalloc::PagemapConfig const**);
host_snmalloc_pagemap_global_get(snmalloc::PagemapConfig const**);
using namespace snmalloc;
int main()
@@ -48,8 +48,8 @@ int main()
std::cout << "Allocated region " << oe_base << " - " << oe_end << std::endl;
// Call these functions to trigger asserts if the cast-to-self doesn't work.
enclave_snmalloc_get_global_pagemap(nullptr);
host_snmalloc_get_global_pagemap(nullptr);
enclave_snmalloc_pagemap_global_get(nullptr);
host_snmalloc_pagemap_global_get(nullptr);
auto a = host_malloc(128);
auto b = enclave_malloc(128);