Lines Matching refs:elem
160 free_to_zone(zone_t zone, void *elem) {
169 ((uint32_t *) elem)[i] = ZP_POISONED;
171 ((uint32_t *) elem)[i] = ZP_POISON;
173 ((vm_offset_t *) elem)[((zone->elem_size)/sizeof(vm_offset_t))-1] = zone->free_elements;
175 ((uint32_t *) elem)[i] = ZP_NOT_POISONED;
179 ((vm_offset_t *) elem)[0] = zone->free_elements;
180 zone->free_elements = (vm_offset_t) elem;
191 void *elem = (void *) zone->free_elements;
192 if (elem != NULL) {
197 if (((uint32_t *) elem)[i] == ZP_POISONED &&
200 if (!is_kernel_data_addr(((vm_offset_t *) elem)[0]) ||
201 ((vm_offset_t *) elem)[0] !=
202 ((vm_offset_t *) elem)[(zone->elem_size/sizeof(vm_offset_t))-1]) {
204 zone->zone_name, ((uint32_t *) elem)[i]);
212 if (((uint32_t *) elem)[i] != ZP_POISON) {
214 zone->zone_name, ((uint32_t *) elem)[i], ZP_POISON, elem);
217 } else if (((uint32_t *) elem)[i] != ZP_NOT_POISONED) {
219 zone->zone_name, ((uint32_t *) elem)[i], ZP_NOT_POISONED, elem);
224 zone->free_elements = ((vm_offset_t *) elem)[0];
226 *ret = elem;
2095 vm_offset_t elem = (vm_offset_t) addr;
2111 if (zone == ZONE_NULL || elem == (vm_offset_t)0)
2125 !from_zone_map(elem, zone->elem_size))) {
2130 zone_last_bogus_elem = elem;
2194 elem -= ZONE_DEBUG_OFFSET;
2201 if (elem == (vm_offset_t)tmp_elem)
2203 if (elem != (vm_offset_t)tmp_elem)
2206 remqueue((queue_t) elem);
2217 if (!pmap_kernel_va(this) || this == elem)
2222 free_to_zone(zone, (void *) elem);
2237 zleak_free(elem, zone->elem_size);
2568 #define ADD_ELEMENT(zone, prev, elem) \
2570 (prev)->next = (elem); \
2573 (vm_offset_t)(elem); \