Made checks on client have own macro.

This commit is contained in:
Matthew Parkinson
2019-06-12 15:26:42 +01:00
parent 7153f2169c
commit cc6a9775d6
4 changed files with 13 additions and 7 deletions

View File

@@ -4,6 +4,12 @@
namespace snmalloc
{
// The CHECK_CLIENT macro is used to turn on minimal checking of the client
// calling the API correctly.
#if !defined(NDEBUG) && !defined(CHECK_CLIENT)
# define CHECK_CLIENT
#endif
// 0 intermediate bits results in power of 2 small allocs. 1 intermediate
// bit gives additional sizeclasses at the midpoint between each power of 2.
// 2 intermediate bits gives 3 intermediate sizeclasses, etc.