MCPcopy Create free account
hub / github.com/acl-dev/acl / dbuf_guard

Method dbuf_guard

lib_acl_cpp/src/stdlib/dbuf_pool.cpp:138–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138dbuf_guard::dbuf_guard(acl::dbuf_pool* dbuf, size_t capacity /* = 500 */)
139: nblock_(2)
140, incr_(500)
141, size_(0)
142{
143 if (dbuf == NULL) {
144#ifdef DBUF_HOOK_NEW
145 dbuf_ = dbuf_internal_ = new (nblock_) acl::dbuf_pool;
146#else
147 dbuf_ = dbuf_internal_ = new acl::dbuf_pool(nblock_);
148#endif
149 } else {
150 dbuf_ = dbuf;
151 dbuf_internal_ = NULL;
152 }
153
154 init(capacity);
155}
156
157dbuf_guard::dbuf_guard(size_t nblock, size_t capacity, size_t align)
158: nblock_(nblock == 0 ? 2 : nblock)

Callers

nothing calls this directly

Calls 1

initFunction · 0.50

Tested by

no test coverage detected