コード例 #1
0
 void* allocInHead(size_t bytes) {
   void* p = _head->data + _head->size;
   _head->size += round_size_up(bytes);
   return p;
 }
コード例 #2
0
 virtual void* alloc(size_t bytes) {
   if (_size + bytes > CAPACITY) return NULL;
   void* p = &_buffer[_size];
   _size += round_size_up(bytes);
   return p;
 }
コード例 #3
0
ファイル: StaticJsonBuffer.hpp プロジェクト: alpellegri/test
 void alignNextAlloc() {
   _size = round_size_up(_size);
 }