Lines Matching defs:offset
50 size_t offset;
92 *ptr = (void*)((uintptr_t)mapped_ptr + header.offset);
93 // the offset does not count as part of the size
94 *size = header.size - header.offset;
106 size_t alloc_size, offset;
137 // Save the size and offset at the start, so we have all we need to unmap the memory
139 // offset directly before the data-section, so we can find the start of the mapped memory.
140 // | size | offset | ... padding ... | offset | ... data ... |
142 // 0 offset size
144 offset = (size_t)((uintptr_t)buf - (uintptr_t)ptr);
147 header->offset = offset;
148 ((size_t*)buf)[-1] = offset;
173 size_t offset = ((size_t*)ptr)[-1];
174 struct memory_header* header = (struct memory_header*)((uintptr_t)ptr - offset);
175 // check if the offset at the beginning of the memory
177 assert(offset == header->offset);