MCPcopy Create free account
hub / github.com/NativeScript/android / allocate

Method allocate

test-app/runtime/src/main/cpp/robin_hood.h:417–425  ·  view source on GitHub ↗

allocates, but does NOT initialize. Use in-place new constructor, e.g. T* obj = pool.allocate(); ::new (static_cast (obj)) T();

Source from the content-addressed store, hash-verified

415 // T* obj = pool.allocate();
416 // ::new (static_cast<void*>(obj)) T();
417 T* allocate() {
418 T* tmp = mHead;
419 if (!tmp) {
420 tmp = performAllocation();
421 }
422
423 mHead = *reinterpret_cast_no_cast_align_warning<T**>(tmp);
424 return tmp;
425 }
426
427 // does not actually deallocate but puts it in store.
428 // make sure you have already called the destructor! e.g. with

Callers 4

writeTreeMethod · 0.80
DataNodeMethod · 0.80

Calls

no outgoing calls

Tested by 1

writeTreeMethod · 0.64