MCPcopy Create free account
hub / github.com/Snapchat/Valdi / allocateBuffer

Function allocateBuffer

valdi_core/src/valdi_core/cpp/Utils/ByteBuffer.cpp:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18static inline Byte* allocateBuffer(size_t size) {
19 if (size == 0) {
20 return nullptr;
21 }
22
23 return reinterpret_cast<Byte*>(malloc(sizeof(Byte) * size)); // NOLINT(cppcoreguidelines-no-malloc)
24}
25
26ByteBuffer::ByteBuffer() = default;
27

Callers 1

reallocateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected