Lines Matching refs:bytes
88 znalloc(MemPool *mp, uintptr_t bytes, size_t align) in znalloc() argument
98 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in znalloc()
100 if (bytes == 0) in znalloc()
108 if (bytes > mp->mp_Size - mp->mp_Used) in znalloc()
121 if (bytes + extra > mn->mr_Bytes) in znalloc()
148 if (mn->mr_Bytes == bytes) { in znalloc()
151 mn = (MemNode *)((char *)mn + bytes); in znalloc()
153 mn->mr_Bytes = ((MemNode *)ptr)->mr_Bytes - bytes; in znalloc()
156 mp->mp_Used += bytes; in znalloc()
172 zfree(MemPool *mp, void *ptr, uintptr_t bytes) in zfree() argument
181 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in zfree()
183 if (bytes == 0) in zfree()
191 (char *)ptr + bytes > (char *)mp->mp_End || in zfree()
193 panic("zfree(%p,%ju): wild pointer", ptr, (uintmax_t)bytes); in zfree()
198 mp->mp_Used -= bytes; in zfree()
211 if ((char *)ptr + bytes > (char *)mn) { in zfree()
213 (uintmax_t)bytes); in zfree()
220 if ((char *)ptr + bytes == (char *)mn) { in zfree()
223 bytes + mn->mr_Bytes; in zfree()
226 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
248 (uintmax_t)bytes); in zfree()
258 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
262 ((MemNode *)pmn)->mr_Bytes += bytes; in zfree()
279 zextendPool(MemPool *mp, void *base, uintptr_t bytes) in zextendPool() argument
283 mp->mp_Used = bytes; in zextendPool()
284 mp->mp_End = (char *)base + bytes; in zextendPool()
285 mp->mp_Size = bytes; in zextendPool()
294 base = (char *)base + bytes; in zextendPool()