diff options
author | Chris Robinson <[email protected]> | 2019-06-06 00:42:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-06 00:42:59 -0700 |
commit | 39c2b18cd484478e633dc062b5f36a2c9544fb51 (patch) | |
tree | 5c294fe0183dc1bc20da46108f21c01f84218010 /common/almalloc.cpp | |
parent | 585b0cf3bed7d1c5720633eb7e5358a9fca865f6 (diff) |
Remove a couple unused functions
Diffstat (limited to 'common/almalloc.cpp')
-rw-r--r-- | common/almalloc.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/common/almalloc.cpp b/common/almalloc.cpp index fbb84479..f94ae8bc 100644 --- a/common/almalloc.cpp +++ b/common/almalloc.cpp @@ -17,15 +17,6 @@ #endif -#ifdef __GNUC__ -#define LIKELY(x) __builtin_expect(!!(x), !0) -#define UNLIKELY(x) __builtin_expect(!!(x), 0) -#else -#define LIKELY(x) (!!(x)) -#define UNLIKELY(x) (!!(x)) -#endif - - void *al_malloc(size_t alignment, size_t size) { assert((alignment & (alignment-1)) == 0); @@ -77,37 +68,3 @@ void al_free(void *ptr) noexcept } #endif } - -size_t al_get_page_size() noexcept -{ - static size_t psize{0u}; - if(UNLIKELY(!psize)) - { -#ifdef HAVE_SYSCONF -#if defined(_SC_PAGESIZE) - if(!psize) psize = sysconf(_SC_PAGESIZE); -#elif defined(_SC_PAGE_SIZE) - if(!psize) psize = sysconf(_SC_PAGE_SIZE); -#endif -#endif /* HAVE_SYSCONF */ -#ifdef _WIN32 - if(!psize) - { - SYSTEM_INFO sysinfo{}; - GetSystemInfo(&sysinfo); - psize = sysinfo.dwPageSize; - } -#endif - if(!psize) psize = alignof(std::max_align_t); - } - return psize; -} - -int al_is_sane_alignment_allocator() noexcept -{ -#if defined(HAVE_ALIGNED_ALLOC) || defined(HAVE_POSIX_MEMALIGN) || defined(HAVE__ALIGNED_MALLOC) - return 1; -#else - return 0; -#endif -} |