| 41 | IOAlloc m_allocator; |
| 42 | |
| 43 | AlignedFileAdaptor(IFile *underlay_file, uint32_t alignment, bool align_memory, |
| 44 | bool ownership, IOAlloc *allocator) |
| 45 | : ForwardFile_Ownership(underlay_file, ownership) |
| 46 | { |
| 47 | // if no allocator specified, initialized by align_memory |
| 48 | if (allocator == nullptr) { |
| 49 | // if align_memory, bind to aligned alloc, else use default |
| 50 | if (align_memory) { |
| 51 | m_allocator = AlignedAlloc(alignment); |
| 52 | } |
| 53 | } else { |
| 54 | m_allocator = *allocator; |
| 55 | } |
| 56 | m_alignment = alignment; |
| 57 | m_align_memory = align_memory; |
| 58 | } |
| 59 | void* mem_alloc(uint64_t size) |
| 60 | { |
| 61 | void* ptr = nullptr; |
nothing calls this directly
no test coverage detected