Go to the documentation of this file.
16 #ifndef GRAPHSCOPE_UTILS_ALLOCATORS_H_
17 #define GRAPHSCOPE_UTILS_ALLOCATORS_H_
91 return static_cast<void*
>(buf->
data());
97 return static_cast<void*
>(buf->
data());
117 #endif // GRAPHSCOPE_UTILS_ALLOCATORS_H_
MemoryStrategy
Definition: mmap_array.h:58
MemoryStrategy strategy_
Definition: allocators.h:101
void * allocate_batch(size_t size)
Definition: allocators.h:80
~ArenaAllocator()
Definition: allocators.h:44
std::string prefix_
Definition: allocators.h:102
std::string to_string(const gs::flex::interactive::Code &status)
Definition: result.h:166
void resize(size_t size)
Definition: mmap_array.h:319
size_t allocated_memory_
Definition: allocators.h:109
Definition: adj_list.h:23
static constexpr size_t batch_size
Definition: allocators.h:30
ArenaAllocator(MemoryStrategy strategy, const std::string &prefix)
Definition: allocators.h:33
void * cur_buffer_
Definition: allocators.h:105
void open(const std::string &filename, bool sync_to_file=false)
Definition: mmap_array.h:129
Definition: allocators.h:29
T * data()
Definition: mmap_array.h:405
std::vector< mmap_array< char > * > mmap_buffers_
Definition: allocators.h:103
size_t allocated_memory() const
Definition: allocators.h:77
size_t cur_loc_
Definition: allocators.h:106
void * allocate(size_t size)
Definition: allocators.h:60
size_t allocated_batches_
Definition: allocators.h:110
void open_with_hugepages(const std::string &filename, size_t capacity=0)
Definition: mmap_array.h:214
size_t cur_size_
Definition: allocators.h:107
void reserve(size_t cap)
Definition: allocators.h:50