| 144 | } |
| 145 | |
| 146 | Result AwaitAllocator::createFixed(Span<char> storage) |
| 147 | { |
| 148 | if (isOpen()) |
| 149 | { |
| 150 | return Result::Error("AwaitAllocator is already open"); |
| 151 | } |
| 152 | if (storage.empty()) |
| 153 | { |
| 154 | return Result::Error("AwaitAllocator fixed storage is empty"); |
| 155 | } |
| 156 | |
| 157 | resetState(); |
| 158 | SC_TRY(initializeFixedStorage(storage)); |
| 159 | currentMode = AwaitAllocatorMode::Fixed; |
| 160 | return Result(true); |
| 161 | } |
| 162 | |
| 163 | Result AwaitAllocator::createVirtual(AwaitAllocatorVirtualOptions options) |
| 164 | { |