Changes libcds library path
[junction.git] / junction / extra / MemHook_TBB.cpp
1 /*------------------------------------------------------------------------
2   Junction: Concurrent data structures in C++
3   Copyright (c) 2016 Jeff Preshing
4
5   Distributed under the Simplified BSD License.
6   Original location: https://github.com/preshing/junction
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the LICENSE file for more information.
11 ------------------------------------------------------------------------*/
12
13 #include <junction/Core.h>
14 #include <turf/Heap.h>
15
16 #if JUNCTION_WITH_TBB && TBB_USE_TURF_HEAP
17 void* tbbWrap_malloc(size_t size) {
18     return TURF_HEAP.alloc(size);
19 }
20
21 void tbbWrap_free(void* ptr) {
22     TURF_HEAP.free(ptr);
23 }
24
25 void* tbbWrap_padded_allocate(size_t size, size_t alignment) {
26     return TURF_HEAP.allocAligned(size, alignment);
27 }
28
29 void tbbWrap_padded_free(void* ptr) {
30     TURF_HEAP.free(ptr);
31 }
32 #endif // JUNCTION_WITH_TBB && TBB_USE_TURF_HEAP