MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / pool_initialize

Function pool_initialize

src/storage.cpp:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 return (object_page*)scalloc(cb, 1, MALLOC_SHARED);
51}
52void pool_initialize(struct alloc_pool *ppool, int cbObject)
53{
54 if ((cbObject % 8) != 0)
55 {
56 cbObject += 8 - (cbObject % 8);
57 }
58 ppool->cbObject = cbObject;
59 ppool->pobjpageHead = pool_allocate_page(cbObject);
60}
61static int IdxAllocObject(struct object_page *page)
62{
63 for (size_t iword = 0; iword < OBJ_PAGE_BITS_PER_WORD; ++iword)

Callers 1

storage_initFunction · 0.85

Calls 1

pool_allocate_pageFunction · 0.85

Tested by

no test coverage detected