Lines Matching refs:bytes
91 znalloc(MemPool *mp, uintptr_t bytes, size_t align) in znalloc() argument
101 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in znalloc()
103 if (bytes == 0) in znalloc()
111 if (bytes > mp->mp_Size - mp->mp_Used) in znalloc()
124 if (bytes + extra > mn->mr_Bytes) in znalloc()
150 if (mn->mr_Bytes == bytes) { in znalloc()
153 mn = (MemNode *)((char *)mn + bytes); in znalloc()
155 mn->mr_Bytes = ((MemNode *)ptr)->mr_Bytes - bytes; in znalloc()
158 mp->mp_Used += bytes; in znalloc()
174 zfree(MemPool *mp, void *ptr, uintptr_t bytes) in zfree() argument
183 bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; in zfree()
185 if (bytes == 0) in zfree()
193 (char *)ptr + bytes > (char *)mp->mp_End || in zfree()
195 panic("zfree(%p,%ju): wild pointer", ptr, (uintmax_t)bytes); in zfree()
200 mp->mp_Used -= bytes; in zfree()
213 if ((char *)ptr + bytes > (char *)mn) { in zfree()
215 (uintmax_t)bytes); in zfree()
222 if ((char *)ptr + bytes == (char *)mn) { in zfree()
225 bytes + mn->mr_Bytes; in zfree()
228 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
250 (uintmax_t)bytes); in zfree()
260 ((MemNode *)ptr)->mr_Bytes = bytes; in zfree()
264 ((MemNode *)pmn)->mr_Bytes += bytes; in zfree()
281 zextendPool(MemPool *mp, void *base, uintptr_t bytes) in zextendPool() argument
285 mp->mp_Used = bytes; in zextendPool()
286 mp->mp_End = (char *)base + bytes; in zextendPool()
287 mp->mp_Size = bytes; in zextendPool()
296 base = (char *)base + bytes; in zextendPool()