Created pal_consts.h. New exported functions are now prefixed with "snmalloc_".

This commit is contained in:
rschust
2019-04-09 13:35:13 +01:00
committed by David Chisnall
parent f0d18760fe
commit 71900ef947
4 changed files with 47 additions and 36 deletions

View File

@@ -205,16 +205,20 @@ extern "C"
return ENOENT;
}
SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(get_global_pagemap)(void)
#ifdef SNMALLOC_EXPOSE_PAGEMAP
SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_get_global_pagemap)(void)
{
return &snmalloc::global_pagemap;
}
#endif
#ifdef SNMALLOC_EXPOSE_RESERVE
SNMALLOC_EXPORT void*
SNMALLOC_NAME_MANGLE(reserve_shared)(size_t* size, size_t align)
SNMALLOC_NAME_MANGLE(snmalloc_reserve_shared)(size_t* size, size_t align)
{
return snmalloc::default_memory_provider.reserve<true>(size, align);
}
#endif
#if !defined(__PIC__) && !defined(NO_BOOTSTRAP_ALLOCATOR)
// The following functions are required to work before TLS is set up, in