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

Function pool_allocate_page

src/storage.cpp:47–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46
47struct object_page *pool_allocate_page(int cbObject)
48{
49 size_t cb = (((size_t)cbObject) * OBJECT_PAGE_BUFFER_SIZE) + sizeof(struct object_page);
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)

Callers 2

pool_initializeFunction · 0.85
pool_allocFunction · 0.85

Calls 1

scallocFunction · 0.70

Tested by

no test coverage detected