Changes libcds library path
[junction.git] / junction / extra / MemHook_NBDS.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_NBDS && NBDS_USE_TURF_HEAP
17 extern "C" {
18 void mem_init(void) {
19 }
20
21 void* nbd_malloc(size_t n) {
22     return TURF_HEAP.alloc(n);
23 }
24
25 void nbd_free(void* x) {
26     TURF_HEAP.free(x);
27 }
28 } // extern "C"
29 #endif // JUNCTION_WITH_NBDS && NBDS_USE_TURF_HEAP