| 83 | namespace internal { |
| 84 | |
| 85 | Status JemallocAllocator::AllocateAligned(int64_t size, int64_t alignment, |
| 86 | uint8_t** out) { |
| 87 | if (size == 0) { |
| 88 | *out = kZeroSizeArea; |
| 89 | return Status::OK(); |
| 90 | } |
| 91 | *out = reinterpret_cast<uint8_t*>( |
| 92 | mallocx(static_cast<size_t>(size), MALLOCX_ALIGN(static_cast<size_t>(alignment)))); |
| 93 | if (*out == NULL) { |
| 94 | return Status::OutOfMemory("malloc of size ", size, " failed"); |
| 95 | } |
| 96 | return Status::OK(); |
| 97 | } |
| 98 | |
| 99 | Status JemallocAllocator::ReallocateAligned(int64_t old_size, int64_t new_size, |
| 100 | int64_t alignment, uint8_t** ptr) { |
nothing calls this directly
no test coverage detected