diff --git a/dist-build/emscripten-symbols.def b/dist-build/emscripten-symbols.def index 9558a886..8ac770c3 100644 --- a/dist-build/emscripten-symbols.def +++ b/dist-build/emscripten-symbols.def @@ -487,7 +487,6 @@ _randombytes_set_implementation 0 0 _randombytes_stir 1 1 _randombytes_uniform 1 1 _sodium_add 0 0 -_sodium_alloc_overhead 0 0 _sodium_allocarray 0 0 _sodium_bin2hex 1 1 _sodium_compare 0 0 diff --git a/src/libsodium/include/sodium/utils.h b/src/libsodium/include/sodium/utils.h index 4586cc2a..0a7aadb4 100644 --- a/src/libsodium/include/sodium/utils.h +++ b/src/libsodium/include/sodium/utils.h @@ -120,9 +120,6 @@ int sodium_mprotect_readonly(void *ptr); SODIUM_EXPORT int sodium_mprotect_readwrite(void *ptr); -SODIUM_EXPORT -size_t sodium_alloc_overhead(size_t size); - /* -------- */ int _sodium_alloc_init(void); diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index 8ef2e630..bff6e359 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -702,13 +702,3 @@ sodium_mprotect_readwrite(void *ptr) { return _sodium_mprotect(ptr, _mprotect_readwrite); } - -size_t -sodium_alloc_overhead(size_t size) -{ -#ifndef HAVE_ALIGNED_MALLOC - return unprotected_size == (size_t) 0U; -#else - return _page_round((sizeof canary) + size) + page_size * (size_t) 3U; -#endif -} diff --git a/test/default/sodium_utils3.c b/test/default/sodium_utils3.c index 4bd7eb5a..3f2b600e 100644 --- a/test/default/sodium_utils3.c +++ b/test/default/sodium_utils3.c @@ -37,9 +37,6 @@ main(void) void * buf; size_t size; - assert(sodium_alloc_overhead((size_t) 0U) != - sodium_alloc_overhead((size_t) 65537U)); - #ifdef SIGSEGV signal(SIGSEGV, segv_handler); #endif