MCPcopy Create free account
hub / github.com/ElementsProject/elements / NewNode

Method NewNode

src/leveldb/db/skiplist.h:182–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180
181template <typename Key, class Comparator>
182typename SkipList<Key, Comparator>::Node* SkipList<Key, Comparator>::NewNode(
183 const Key& key, int height) {
184 char* const node_memory = arena_->AllocateAligned(
185 sizeof(Node) + sizeof(std::atomic<Node*>) * (height - 1));
186 return new (node_memory) Node(key);
187}
188
189template <typename Key, class Comparator>
190inline SkipList<Key, Comparator>::Iterator::Iterator(const SkipList* list) {

Callers

nothing calls this directly

Calls 1

AllocateAlignedMethod · 0.80

Tested by

no test coverage detected