XPT_SetDataOffset(XPTState *state, uint32_t data_offset) { state->data_offset = data_offset; /* make sure we've allocated enough space for the header */ if (state->mode == XPT_ENCODE && data_offset > state->pool->allocated) { (void)GrowPool(state->arena, state->pool, state->pool->allocated, data_offset, 0); } }
void PoolIdAllocator::Free(Identifier ident) { ansa::ScopedLock scope(lock); // if the pool is full, expand it if (poolCount == poolCapacity) { GrowPool(); } pool[poolCount++] = ident; --count; }