Lines Matching refs:zrecords
397 static struct zrecord *zrecords; /* the log itself, dynamically allocated when logging is enabled */
449 #define DO_LOGGING(z) (zrecords && (z) == zone_of_interest)
576 if (zone_of_interest != NULL && zrecords == NULL && zlog_ready) {
577 if (kmem_alloc(kernel_map, (vm_offset_t *)&zrecords, log_records * sizeof(struct zrecord)) == KERN_SUCCESS) {
584 bzero((void *)zrecords, log_records * sizeof(struct zrecord));
588 printf("zone: couldn't allocate memory for zrecords, turning off zleak logging\n");
1049 if (!check_freed_element && zrecords[zcurrent].z_element && zrecorded < log_records) {
1059 if (zrecords[i].z_element == NULL) {
1066 if (zrecords[i].z_element == NULL) {
1078 if (zrecords[zcurrent].z_element == NULL)
1081 zrecords[zcurrent].z_element = (void *)addr;
1082 zrecords[zcurrent].z_time = ztime++;
1083 zrecords[zcurrent].z_opcode = ZOP_ALLOC;
1086 zrecords[zcurrent].z_pc[i] = bt[i];
1089 zrecords[zcurrent].z_pc[i] = 0;
1243 if (zrecords[zcurrent].z_element == NULL)
1246 zrecords[zcurrent].z_element = (void *)addr;
1247 zrecords[zcurrent].z_time = ztime++;
1248 zrecords[zcurrent].z_opcode = ZOP_FREE;
1251 zrecords[zcurrent].z_pc[i] = bt[i];
1254 zrecords[zcurrent].z_pc[i] = 0;
1271 if (zrecords[i].z_element == addr) {
1272 zrecords[i].z_element = NULL;