MCPcopy Create free account
hub / github.com/apache/impala / TryAllocateAligned

Method TryAllocateAligned

be/src/runtime/mem-pool.h:140–146  ·  view source on GitHub ↗

Same as TryAllocate() except a non-default alignment can be specified. It should be a power-of-two in [1, alignof(std::max_align_t)].

Source from the content-addressed store, hash-verified

138 /// Same as TryAllocate() except a non-default alignment can be specified. It
139 /// should be a power-of-two in [1, alignof(std::max_align_t)].
140 uint8_t* TryAllocateAligned(int64_t size, int alignment) noexcept {
141 DFAKE_SCOPED_LOCK(mutex_);
142 DCHECK_GE(alignment, 1);
143 DCHECK_LE(alignment, alignof(std::max_align_t));
144 DCHECK_EQ(BitUtil::RoundUpToPowerOfTwo(alignment), alignment);
145 return Allocate<true>(size, alignment);
146 }
147
148 /// Same as TryAllocate() except returned memory is not aligned at all.
149 uint8_t* TryAllocateUnaligned(int64_t size) noexcept {

Callers 3

AllocateAnyValFunction · 0.80
InitDataDecoderMethod · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64