MCPcopy Create free account
hub / github.com/bytedance/bolt / previousFreeSize

Function previousFreeSize

bolt/common/memory/HashStringAllocator.cpp:40–42  ·  view source on GitHub ↗

Returns the size of the previous free block. The size is stored in the last 4 bytes of the free block, e.g. 4 bytes just before the current header.

Source from the content-addressed store, hash-verified

38/// last 4 bytes of the free block, e.g. 4 bytes just before the current
39/// header.
40uint32_t* previousFreeSize(HashStringAllocator::Header* header) {
41 return reinterpret_cast<uint32_t*>(header) - 1;
42}
43
44/// Returns the header of the previous free block or nullptr if previous block
45/// is not free.

Callers 3

markAsFreeFunction · 0.85
toStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected