MCPcopy Create free account
hub / github.com/apache/cloudberry / S3VectorUInt8

Class S3VectorUInt8

gpcontrib/gpcloud/include/s3memory_mgmt.h:165–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163typedef PGAllocator<uint8_t> S3MemoryContext;
164
165class S3VectorUInt8 : public std::vector<uint8_t, S3MemoryContext> {
166 public:
167 explicit S3VectorUInt8() : std::vector<uint8_t, S3MemoryContext>(S3MemoryContext()) {
168 }
169
170 explicit S3VectorUInt8(size_t size)
171 : std::vector<uint8_t, S3MemoryContext>(size, 0, S3MemoryContext()) {
172 }
173
174 explicit S3VectorUInt8(const std::vector<uint8_t>& v)
175 : std::vector<uint8_t, S3MemoryContext>(v.begin(), v.end(), S3MemoryContext()) {
176 }
177
178 explicit S3VectorUInt8(const S3MemoryContext& context)
179 : std::vector<uint8_t, S3MemoryContext>(context) {
180 }
181
182 void release() {
183 // clear() will not release the memory, we use the swap approach to force release memory.
184 S3VectorUInt8(this->get_allocator()).swap(*this);
185 }
186};
187
188#endif

Callers 1

releaseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected