Lines Matching refs:size_t
58 BlockAllocator(size_t block_size, size_t isolation_threshold)
99 MemBlock *alloc_mem_block(size_t size) {
110 void *alloc(size_t size) {
111 if (size + sizeof(size_t) >= isolation_threshold) {
112 auto len = std::max(static_cast<size_t>(16), size);
113 // We will store the allocated size in size_t field.
114 auto mb = alloc_mem_block(len + sizeof(size_t));
115 auto sp = reinterpret_cast<size_t *>(mb->begin);
118 return mb->begin + sizeof(size_t);
122 head->end - head->last < static_cast<ssize_t>(size + sizeof(size_t))) {
126 // We will store the allocated size in size_t field.
127 auto res = head->last + sizeof(size_t);
128 auto sp = reinterpret_cast<size_t *>(head->last);
139 size_t get_alloc_length(void *ptr) {
140 return *reinterpret_cast<size_t *>(static_cast<uint8_t *>(ptr) -
141 sizeof(size_t));
151 void *realloc(void *ptr, size_t size) {
174 size_t block_size;
177 size_t isolation_threshold;
193 inline constexpr size_t concat_string_ref_count(size_t acc) { return acc; }
199 constexpr size_t concat_string_ref_count(size_t acc, const StringRef &value,
224 size_t len = concat_string_ref_count(0, std::forward<Args>(args)...);
260 size_t len;
266 ByteRef make_byte_ref(BlockAllocator &alloc, size_t size) {