blob: 3fe22c03fab3fb818d5f3bc0381227d0429f2833 [file] [log] [blame]
Austin Schuh40485ed2019-10-26 21:51:44 -07001#include "aos/flatbuffers.h"
2
3#include "glog/logging.h"
4
5namespace aos {
6
7uint8_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
16uint8_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