Lines Matching defs:alloc
110 void *alloc(size_t size) {
138 // that |ptr| was returned from alloc() or realloc().
145 // this is equivalent to alloc(size). If |ptr| is not nullptr,
147 // returned from alloc() or realloc(). If the allocated size is
153 return alloc(size);
163 auto res = alloc(nalloclen);
183 StringRef make_string_ref(BlockAllocator &alloc, const StringRef &src) {
184 auto dst = static_cast<uint8_t *>(alloc.alloc(src.size() + 1));
223 StringRef concat_string_ref(BlockAllocator &alloc, Args &&...args) {
225 auto dst = static_cast<uint8_t *>(alloc.alloc(len + 1));
235 // obtained from alloc.alloc() or alloc.realloc(), and attempts to use
236 // unused memory region by using alloc.realloc(). If value is empty,
239 StringRef realloc_concat_string_ref(BlockAllocator &alloc,
242 return concat_string_ref(alloc, std::forward<Args>(args)...);
248 alloc.realloc(const_cast<uint8_t *>(value.byte()), len + 1));
266 ByteRef make_byte_ref(BlockAllocator &alloc, size_t size) {
267 auto dst = static_cast<uint8_t *>(alloc.alloc(size));