Lines Matching refs:bytes
89 znalloc(MemPool *mp, uintptr_t bytes, size_t align) in znalloc() argument
99 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in znalloc()
101 if (bytes == 0) in znalloc()
109 if (bytes > mp->mp_Size - mp->mp_Used) in znalloc()
122 if (bytes + extra > mn->mr_Bytes) in znalloc()
149 if (mn->mr_Bytes == bytes) { in znalloc()
152 mn = (MemNode *)((char *)mn + bytes); in znalloc()
154 mn->mr_Bytes = ((MemNode *)ptr)->mr_Bytes - bytes; in znalloc()
157 mp->mp_Used += bytes; in znalloc()
173 zfree(MemPool *mp, void *ptr, uintptr_t bytes) in zfree() argument
182 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in zfree()
184 if (bytes == 0) in zfree()
192 (char *)ptr + bytes > (char *)mp->mp_End || in zfree()
194 panic("zfree(%p,%ju): wild pointer", ptr, (uintmax_t)bytes); in zfree()
199 mp->mp_Used -= bytes; in zfree()
212 if ((char *)ptr + bytes > (char *)mn) { in zfree()
214 (uintmax_t)bytes); in zfree()
221 if ((char *)ptr + bytes == (char *)mn) { in zfree()
224 bytes + mn->mr_Bytes; in zfree()
227 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
249 (uintmax_t)bytes); in zfree()
259 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
263 ((MemNode *)pmn)->mr_Bytes += bytes; in zfree()
280 zextendPool(MemPool *mp, void *base, uintptr_t bytes) in zextendPool() argument
284 mp->mp_Used = bytes; in zextendPool()
285 mp->mp_End = (char *)base + bytes; in zextendPool()
286 mp->mp_Size = bytes; in zextendPool()
295 base = (char *)base + bytes; in zextendPool()