| 1 | // -*- C++ -*-cxx . . $ `<file>/vendor/Heap-Layers/heaps/utility/exactlyoneheap.h`/ |
| 2 | |
| 3 | /* |
| 4 | |
| 5 | Heap Layers: An Extensible Memory Allocation Infrastructure |
| 6 | |
| 7 | Copyright (C) 2000-2020 by Emery Berger |
| 8 | http://www.emeryberger.com |
| 9 | [email protected] |
| 10 | |
| 11 | Heap Layers is distributed under the terms of the Apache 2.0 license. |
| 12 | |
| 13 | You may obtain a copy of the License at |
| 14 | http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | |
| 16 | */ |
| 17 | |
| 18 | #ifndef HL_EXACTLYONEHEAP_H |
| 19 | #define HL_EXACTLYONEHEAP_Hcxx . . $ `vendor/Heap-Layers/heaps/utility/exactlyoneheap.h:19:9`! |
| 20 | |
| 21 | #include "utility/exactlyone.h"cxx . . $ `<file>/vendor/Heap-Layers/utility/exactlyone.h`/ |
| 22 | |
| 23 | namespace HLcxx . . $ HL/ { |
| 24 | |
| 25 | template <class Heap> |
| 26 | class ExactlyOneHeapcxx . . $ HL/ExactlyOneHeap# : public HLcxx . . $ HL/::ExactlyOnecxx . . $ HL/ExactlyOne#<Heap> { |
| 27 | public: |
| 28 | |
| 29 | enumcxx . . $ HL/ExactlyOneHeap#$anonymous_type_0# { Alignmentcxx . . $ HL/ExactlyOneHeap#Alignment. = Heap::Alignment }; |
| 30 | |
| 31 | inline void * malloccxx . . $ HL/ExactlyOneHeap#malloc(bfcfa4d6b7f7ef64). (size_t sz) { |
| 32 | return (*this)().malloc (sz); |
| 33 | } |
| 34 | inline void freecxx . . $ HL/ExactlyOneHeap#free(5d22bdacc48458e8). (void * ptr) { |
| 35 | (*this)().free (ptr); |
| 36 | } |
| 37 | inline void freecxx . . $ HL/ExactlyOneHeap#free(5500c4293b1bbef0). (void * ptr, size_t sz) { |
| 38 | (*this)().free (ptr, sz); |
| 39 | } |
| 40 | inline size_t getSizecxx . . $ HL/ExactlyOneHeap#getSize(751e5d26f8574c32). (void * ptr) { |
| 41 | return (*this)().getSize (ptr); |
| 42 | } |
| 43 | inline int getClasscxx . . $ HL/ExactlyOneHeap#getClass(dedf1e9b1c614a07). (void * ptr) { |
| 44 | return (*this)().getClass (ptr); |
| 45 | } |
| 46 | inline void clearcxx . . $ HL/ExactlyOneHeap#clear(49f6e7a06ebc5aa8).() { |
| 47 | (*this)().clear(); |
| 48 | } |
| 49 | inline void lockcxx . . $ HL/ExactlyOneHeap#lock(49f6e7a06ebc5aa8).() { |
| 50 | (*this)().lock(); |
| 51 | } |
| 52 | inline void unlockcxx . . $ HL/ExactlyOneHeap#unlock(49f6e7a06ebc5aa8).() { |
| 53 | (*this)().unlock(); |
| 54 | } |
| 55 | }; |
| 56 | |
| 57 | } |
| 58 | |
| 59 | #endif |