- if (gzalloc_consistency_checks) {
- if (gzh->gzsig != GZALLOC_SIGNATURE) {
- panic("GZALLOC signature mismatch for element %p, expected 0x%x, found 0x%x", addr, GZALLOC_SIGNATURE, gzh->gzsig);
- }
-
- if (gzh->gzone != zone && (gzh->gzone != GZDEADZONE))
- panic("%s: Mismatched zone or under/overflow, current zone: %p, recorded zone: %p, address: %p", __FUNCTION__, zone, gzh->gzone, (void *)addr);
- /* Partially redundant given the zone check, but may flag header corruption */
- if (gzh->gzsize != zone->elem_size) {
- panic("Mismatched zfree or under/overflow for zone %p, recorded size: 0x%x, element size: 0x%x, address: %p\n", zone, gzh->gzsize, (uint32_t) zone->elem_size, (void *)addr);
- }
-
- char *gzc, *checkstart, *checkend;
- if (gzalloc_uf_mode) {
- checkstart = (char *) ((uintptr_t) gzh + sizeof(gzh));
- checkend = (char *) ((((vm_offset_t)addr) & ~PAGE_MASK) + PAGE_SIZE);
- } else {
- checkstart = (char *) trunc_page_64(addr);
- checkend = (char *)gzh;
- }
-
- for (gzc = checkstart; gzc < checkend; gzc++) {
- if (*gzc != gzalloc_fill_pattern) {
- panic("GZALLOC: detected over/underflow, byte at %p, element %p, contents 0x%x from 0x%lx byte sized zone (%s) doesn't match fill pattern (%c)", gzc, addr, *gzc, zone->elem_size, zone->zone_name, gzalloc_fill_pattern);
- }
- }
+ if (gzalloc_consistency_checks) {
+ if (gzh->gzsig != GZALLOC_SIGNATURE) {
+ panic("GZALLOC signature mismatch for element %p, "
+ "expected 0x%x, found 0x%x",
+ addr, GZALLOC_SIGNATURE, gzh->gzsig);