13 #ifndef HERMES_BUFFER_POOL_INTERNAL_H_
14 #define HERMES_BUFFER_POOL_INTERNAL_H_
58 Arena *scratch_arena,
i32 node_id, Config *config);
169 const std::vector<BufferID> &buffer_ids);
194 void ParseConfig(Arena *arena,
const char *path, Config *config);
209 Target *
GetTarget(SharedMemoryContext *context,
int index);
Definition: adapter_utils.cc:35
void MergeRamBufferFreeList(SharedMemoryContext *context, int slab_index)
Definition: buffer_pool.cc:937
BufferHeader * GetHeadersBase(SharedMemoryContext *context)
Definition: buffer_pool.cc:200
Target * GetTargetFromId(SharedMemoryContext *context, TargetID id)
Definition: buffer_pool.cc:167
BufferPool * GetBufferPoolFromContext(SharedMemoryContext *context)
Definition: buffer_pool.cc:140
u8 * GetRamBufferPtr(SharedMemoryContext *context, BufferID buffer_id)
Definition: buffer_pool.cc:792
i32 GetSlabBufferSize(SharedMemoryContext *context, DeviceID device_id, int slab_index)
Definition: buffer_pool.cc:331
BufferHeader * GetHeaderByBufferId(SharedMemoryContext *context, BufferID id)
Definition: buffer_pool.cc:218
Target * GetTarget(SharedMemoryContext *context, int index)
Definition: buffer_pool.cc:158
bool HeaderIsDormant(BufferHeader *header)
Definition: buffer_pool.cc:244
void SerializeBufferPoolToFile(SharedMemoryContext *context, FILE *file)
Definition: buffer_pool.cc:1386
uint8_t u8
Definition: hermes_types.h:40
i32 GetSlabUnitSize(SharedMemoryContext *context, DeviceID device_id, int slab_index)
Definition: buffer_pool.cc:306
u16 DeviceID
Definition: hermes_types.h:51
Device * GetDeviceById(SharedMemoryContext *context, DeviceID device_id)
Definition: buffer_pool.cc:185
BufferID PeekFirstFreeBufferId(SharedMemoryContext *context, DeviceID device_id, int slab_index)
Definition: buffer_pool.cc:435
void LocalReleaseBuffers(SharedMemoryContext *context, const std::vector< BufferID > &buffer_ids)
Definition: buffer_pool.cc:626
void SplitRamBufferFreeList(SharedMemoryContext *context, int slab_index)
Definition: buffer_pool.cc:1076
u8 * InitSharedMemory(const char *shmem_name, size_t total_size)
Definition: buffer_pool.cc:1526
uint32_t u32
Definition: hermes_types.h:42
int32_t i32
Definition: hermes_types.h:46
void ParseConfig(Arena *arena, const char *path, Config *config)
Definition: config_parser.cc:530
void LocalReleaseBuffer(SharedMemoryContext *context, BufferID buffer_id)
Definition: buffer_pool.cc:576
ptrdiff_t InitBufferPool(u8 *shmem_base, Arena *buffer_pool_arena, Arena *scratch_arena, i32 node_id, Config *config)
Definition: buffer_pool.cc:1148
std::atomic< u32 > * GetAvailableBuffersArray(SharedMemoryContext *context, DeviceID device_id)
Definition: buffer_pool.cc:465
u32 LocalGetBufferSize(SharedMemoryContext *context, BufferID id)
Definition: buffer_pool.cc:720