MCPcopy Create free account
hub / github.com/apache/arrow / Allocate

Method Allocate

r/src/array_to_vector.cpp:795–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793 }
794
795 SEXP Allocate(R_xlen_t n) const {
796 // allocate a data frame column to host each array
797 // If possible, a column is dealt with directly with altrep
798 return AllocateDataFrame(n, [n](const std::shared_ptr<Converter>& converter) {
799 SEXP out = converter->MaybeAltrep();
800 if (Rf_isNull(out)) {
801 out = converter->Allocate(n);
802 }
803 return out;
804 });
805 }
806
807 SEXP AllocateSlice(R_xlen_t n) const {
808 // altrep would shadow the whole chunked array rather than the slice

Callers

nothing calls this directly

Calls 2

MaybeAltrepMethod · 0.80
AllocateMethod · 0.45

Tested by

no test coverage detected