MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / AllocateStorage

Method AllocateStorage

Bcore/src/main/cpp/base/hash_set.h:582–590  ·  view source on GitHub ↗

Allocate a number of buckets.

Source from the content-addressed store, hash-verified

580
581 // Allocate a number of buckets.
582 void AllocateStorage(size_t num_buckets) {
583 num_buckets_ = num_buckets;
584 data_ = allocfn_.allocate(num_buckets_);
585 owns_data_ = true;
586 for (size_t i = 0; i < num_buckets_; ++i) {
587 allocfn_.construct(allocfn_.address(data_[i]));
588 emptyfn_.MakeEmpty(data_[i]);
589 }
590 }
591
592 void DeallocateStorage() {
593 if (owns_data_) {

Callers

nothing calls this directly

Calls 2

addressMethod · 0.80
MakeEmptyMethod · 0.45

Tested by

no test coverage detected