From 908b8b96c31a9a01af6e39f6863a2f3bb05a7f43 Mon Sep 17 00:00:00 2001 From: Ganael LAPLANCHE Date: Sat, 17 Jul 2021 18:57:26 +0200 Subject: devel/onetbb: Integrate patch from previous commit 1daf680 to avoid fetch problems. PR: 257220 Reported by: mandree --- .../onetbb/files/patch-src_tbbmalloc_frontend.cpp | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 devel/onetbb/files/patch-src_tbbmalloc_frontend.cpp (limited to 'devel/onetbb/files') diff --git a/devel/onetbb/files/patch-src_tbbmalloc_frontend.cpp b/devel/onetbb/files/patch-src_tbbmalloc_frontend.cpp new file mode 100644 index 000000000000..314267054456 --- /dev/null +++ b/devel/onetbb/files/patch-src_tbbmalloc_frontend.cpp @@ -0,0 +1,30 @@ +Backport fa944e19600500863507ed8e9b1f5a30037d9df6 + +--- src/tbbmalloc/frontend.cpp.orig 2021-06-30 08:19:55 UTC ++++ src/tbbmalloc/frontend.cpp +@@ -802,21 +802,15 @@ static inline unsigned int highestBitPos(unsigned int + return pos; + } + +- +-#if __TBB_x86_32 || __aarch32__ + unsigned int getSmallObjectIndex(unsigned int size) + { +- return (size-1)>>3; +-} +-#elif __TBB_x86_64 || __aarch64__ +-unsigned int getSmallObjectIndex(unsigned int size) +-{ +- // For 64-bit malloc, 16 byte alignment is needed except for bin 0. + unsigned int result = (size-1)>>3; +- if (result) result |= 1; // 0,1,3,5,7; bins 2,4,6 are not aligned to 16 bytes ++ if (sizeof(void*)==8) { ++ // For 64-bit malloc, 16 byte alignment is needed except for bin 0. ++ if (result) result |= 1; // 0,1,3,5,7; bins 2,4,6 are not aligned to 16 bytes ++ } + return result; + } +-#endif // __TBB_x86_32 || __aarch32__ + + /* + * Depending on indexRequest, for a given size return either the index into the bin -- cgit v1.2.3