AFL_ALIGNED_ALLOC in libdislocator

This commit is contained in:
Andrea Fioraldi
2020-02-01 19:12:26 +01:00
parent 86a25e64cd
commit 4384008f81
12 changed files with 93 additions and 51 deletions

View File

@ -238,7 +238,7 @@ void bind_to_free_cpu(void) {
#elif defined(__FreeBSD__) || defined(__DragonFly__)
if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c)) {
if (cpu_start == cpu_core_count)
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);
@ -247,9 +247,10 @@ void bind_to_free_cpu(void) {
;
}
#elif defined(__NetBSD__)
if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c)) {
if (cpu_start == cpu_core_count)
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);