aboutsummaryrefslogtreecommitdiffstats
path: root/common/almalloc.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-16 19:24:14 -0800
committerChris Robinson <[email protected]>2018-01-16 19:28:10 -0800
commit3baf9d0e81c16555fc417697a5445b7cd674db02 (patch)
tree3586c9a938ada32394cdc05430332f01da7e6728 /common/almalloc.h
parent248832b26680de4ce48bf17076287a07dbd36ff7 (diff)
Add a method to get the system's page size
Diffstat (limited to 'common/almalloc.h')
-rw-r--r--common/almalloc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/almalloc.h b/common/almalloc.h
index 8eadb5b3..a4297cf5 100644
--- a/common/almalloc.h
+++ b/common/almalloc.h
@@ -14,6 +14,15 @@ void *al_malloc(size_t alignment, size_t size);
void *al_calloc(size_t alignment, size_t size);
void al_free(void *ptr);
+size_t al_get_page_size(void);
+
+/**
+ * Returns non-0 if the allocation function has direct alignment handling.
+ * Otherwise, the standard malloc is used with an over-allocation and pointer
+ * offset strategy.
+ */
+int al_is_sane_alignment_allocator(void);
+
#ifdef __cplusplus
}
#endif