Configurable client meta-data (#662)
This provide a way to configure snmalloc to provide per object meta-data that is out of band. This can be used to provide different mitigations on top of snmalloc, such as storing memory tags in a compressed form, or provide a miracle pointer like feature. This also includes a couple of TSAN fixes as it wasn't fully on in CI.
This commit is contained in:
committed by
GitHub
parent
2dba088d24
commit
2a7eabef6c
@@ -154,7 +154,7 @@ void test_tasks(size_t num_tasks, size_t count, size_t size)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
snmalloc::debug_check_empty<snmalloc::Alloc::Config>();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace test
|
||||
alloc.dealloc(objects[i]);
|
||||
}
|
||||
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
snmalloc::debug_check_empty<snmalloc::Alloc::Config>();
|
||||
}
|
||||
|
||||
void test_external_pointer(xoroshiro::p128r64& r)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "snmalloc/global/memcpy.h"
|
||||
|
||||
#include <snmalloc/snmalloc.h>
|
||||
#include <test/measuretime.h>
|
||||
#include <test/opt.h>
|
||||
#include <vector>
|
||||
|
||||
@@ -60,7 +60,7 @@ void test_alloc_dealloc(size_t count, size_t size, bool write)
|
||||
}
|
||||
}
|
||||
|
||||
snmalloc::debug_check_empty<StandardConfig>();
|
||||
snmalloc::debug_check_empty<snmalloc::Alloc::Config>();
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
||||
Reference in New Issue
Block a user