1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Revert "+ sodium_alloc_overhead()"

This reverts commit c5b61d8129.
This commit is contained in:
Frank Denis 2017-08-02 14:26:56 +02:00
parent c5b61d8129
commit f02770b2ad
4 changed files with 0 additions and 17 deletions

View File

@ -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

View File

@ -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);

View File

@ -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
}

View File

@ -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