MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / alloc

Method alloc

src/jrd/evl_string.h:88–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 void* alloc(SLONG count)
89 {
90 void* result;
91 const SLONG localCount = ROUNDUP(count, FB_ALIGNMENT);
92 if (allocated + localCount <= STATIC_PATTERN_BUFFER)
93 {
94 result = allocBuffer + allocated;
95 allocated += localCount;
96 }
97 else
98 {
99 result = pool.allocate(count ALLOC_ARGS);
100 chunksToFree.add(result);
101 }
102 return result;
103 }
104
105protected:
106 MemoryPool& pool;

Callers

nothing calls this directly

Calls 2

allocateMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected