3#include "storage/common/arena_allocator.h"
4#include "common/type/string_t.h"
5#include "common/log/log.h"
12 string_t add_string(
const char *data,
int len)
14 if (len <= string_t::INLINE_LENGTH) {
17 auto insert_string = empty_string(len);
18 auto insert_pos = insert_string.get_data_writeable();
19 memcpy(insert_pos, data, len);
23 string_t add_string(
string_t data) {
return add_string(data.data(), data.size()); }
27 ASSERT(len > string_t::INLINE_LENGTH,
"len > string_t::INLINE_LENGTH");
28 auto insert_pos = heap.Allocate(len);
Definition: arena_allocator.h:24
Definition: vector_buffer.h:8
Definition: string_t.h:18