Lines Matching refs:uintptr_t

128 static oversize_t *oversize_header_alloc(uintptr_t, size_t);
134 #define HASH_OVERSIZE(caddr) ((uintptr_t)(caddr) % NUM_BUCKETS)
137 #define ALIGN(x, a) ((((uintptr_t)(x) + ((uintptr_t)(a) - 1)) \
138 & ~((uintptr_t)(a) - 1)))
191 #define MTMALLOC_OVERSIZE_MAGIC ((uintptr_t)&oversize_list)
192 #define MTMALLOC_MEMALIGN_MAGIC ((uintptr_t)&oversize_list + 1)
193 #define MTMALLOC_MEMALIGN_MIN_MAGIC ((uintptr_t)&oversize_list + 2)
210 *((uintptr_t *)((caddr_t)x - OVERHEAD)) = \
213 *((uintptr_t *)((caddr_t)x - OVERHEAD)) = \
215 *((uintptr_t *)((caddr_t)x - 2 * OVERHEAD)) = \
216 (uintptr_t)malloc_addr; \
276 if (*(uintptr_t *)mem < MTMALLOC_OVERSIZE_MAGIC ||
277 *(uintptr_t *)mem > MTMALLOC_MEMALIGN_MIN_MAGIC) {
278 cacheptr = (cache_t *)*(uintptr_t *)mem;
301 if (*(uintptr_t *)mem == MTMALLOC_MEMALIGN_MAGIC) {
303 ptr = (void *)*(uintptr_t *)mem;
305 shift = (size_t)((uintptr_t)data_ptr - (uintptr_t)ptr);
306 } else if (*(uintptr_t *)mem == MTMALLOC_MEMALIGN_MIN_MAGIC) {
312 if (*(uintptr_t *)mem == MTMALLOC_OVERSIZE_MAGIC) {
321 cacheptr = (cache_t *)*(uintptr_t *)mem;
351 uintptr_t offset;
360 if (*(uintptr_t *)mem == MTMALLOC_MEMALIGN_MAGIC) {
362 ptr = (void *)*(uintptr_t *)mem;
364 } else if (*(uintptr_t *)mem == MTMALLOC_MEMALIGN_MIN_MAGIC) {
369 if (*(uintptr_t *)mem == MTMALLOC_OVERSIZE_MAGIC) {
399 cacheptr = (cache_t *)*(uintptr_t *)mem;
451 uintptr_t offset;
488 if ((offset = (uintptr_t)alloc_buf & (alignment - 1)) == 0) {
500 uintptr_t taddr;
502 taddr = ALIGN((uintptr_t)alloc_buf + size,
504 data_size = taddr - (uintptr_t)alloc_buf;
505 orig = (oversize_t *)((uintptr_t)alloc_buf -
517 uintptr_t ret_addr, taddr, shift, tshift;
526 ret_addr = ((uintptr_t)alloc_buf + shift);
571 taddr = ALIGN((uintptr_t)alloc_buf +
577 shift = ret_addr - (uintptr_t)alloc_buf;
587 orig = (oversize_t *)((uintptr_t)alloc_buf -
605 orig = (oversize_t *)((uintptr_t)alloc_buf -
629 (uintptr_t)alloc_buf);
630 orig = (oversize_t *)((uintptr_t)alloc_buf -
649 orig = (oversize_t *)((uintptr_t)alloc_buf -
685 orig = (oversize_t *)((uintptr_t)alloc_buf -
773 uintptr_t oldbrk;
774 uintptr_t newbrk;
784 uintptr_t list_addr;
810 oldbrk = (uintptr_t)sbrk(0);
822 if (newbrk != oldbrk && (uintptr_t)sbrk(newbrk - oldbrk) != oldbrk)
833 (uintptr_t)new_cpu_list != newbrk)
841 newbrk = (uintptr_t)new_cpu_list + cache_space_needed;
845 if (padding > 0 && (uintptr_t)sbrk(padding) != newbrk)
848 list_addr = ((uintptr_t)new_cpu_list + (sizeof (percpu_t) * ncpus));
919 nblocks = (uintptr_t)((caddr_t)cp->mt_freelist +
973 uint32_t *freeblocks; /* not a uintptr_t on purpose */
982 n = (uintptr_t)(((freeblocks -
1003 uint32_t *freeblocks; /* not a uintptr_t on purpose */
1117 n = (uintptr_t)(((freeblocks - (uint32_t *)thiscache->mt_freelist) << 5)
1129 *(uintptr_t *)ret = (uintptr_t)thiscache;
1140 assert(((uintptr_t)ret & 7) == 0); /* are we 8 byte aligned */
1223 big = oversize_header_alloc((uintptr_t)ret, size);
1233 assert(((uintptr_t)ret & 7) == 0); /* are we 8 byte aligned */
1310 uintptr_t endp_lp, endp_pv, endp_nx;
1326 endp_lp = ALIGN((uintptr_t)lp + size_lp, MTMALLOC_MIN_ALIGN);
1327 size_lp = endp_lp - (uintptr_t)lp;
1334 endp_pv = ALIGN((uintptr_t)pv + size_pv,
1336 size_pv = endp_pv - (uintptr_t)pv;
1339 if ((uintptr_t)lp == endp_pv)
1346 if ((uintptr_t)nx == endp_lp) {
1348 endp_nx = ALIGN((uintptr_t)nx + size_nx,
1350 size_nx = endp_nx - (uintptr_t)nx;
1417 np = oversize_header_alloc((uintptr_t)off,
1458 assert(((uintptr_t)ovp->addr & 7) == 0); /* are we 8 byte aligned */
1469 oversize_header_alloc(uintptr_t mem, size_t size)
1483 *(uintptr_t *)mem = MTMALLOC_OVERSIZE_MAGIC;
1485 assert(((uintptr_t)mem & 7) == 0); /* are we 8 byte aligned */