MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / DataBlock_GetReservedIdx

Function DataBlock_GetReservedIdx

src/util/datablock/datablock.c:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168uint64_t DataBlock_GetReservedIdx(const DataBlock *dataBlock, uint64_t n) {
169 ASSERT(dataBlock != NULL);
170
171 uint deleted = DataBlock_DeletedItemsCount(dataBlock);
172 if(n < deleted) {
173 return dataBlock->deletedIdx[deleted - n - 1];
174 }
175
176 return DataBlock_ItemCount(dataBlock) + n;
177}
178
179void *DataBlock_AllocateItem(DataBlock *dataBlock, uint64_t *idx) {
180 // make sure we've got room for items

Callers 1

Graph_ReserveNodeFunction · 0.85

Calls 2

DataBlock_ItemCountFunction · 0.85

Tested by

no test coverage detected