Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame^] | 1 | #include "aos/flatbuffers.h" |
| 2 | |
| 3 | #include "glog/logging.h" |
| 4 | |
| 5 | namespace aos { |
| 6 | |
| 7 | uint8_t *FixedAllocatorBase::allocate(size_t) { |
| 8 | if (is_allocated_) { |
| 9 | LOG(FATAL) << "Tried to allocate already allocated flatbuffer"; |
| 10 | } |
| 11 | |
| 12 | is_allocated_ = true; |
| 13 | return data(); |
| 14 | } |
| 15 | |
| 16 | uint8_t *FixedAllocatorBase::reallocate_downward(uint8_t *, size_t, size_t, |
| 17 | size_t, size_t) { |
| 18 | LOG(FATAL) << "Tried to reallocate a flatbuffer"; |
| 19 | return nullptr; |
| 20 | } |
| 21 | |
| 22 | } // namespace aos |