Lines Matching defs:zone
75 struct mem_zone *zone = mem;
79 if (zone == NULL || (zone->limit && zone->total + len > zone->limit))
99 item->next = zone->first;
100 zone->first = item;
103 zone->total += item->size;
104 if (zone->total > zone->highwater)
105 zone->highwater = zone->total;
115 struct mem_zone *zone = mem;
117 /* if no zone, just do a free */
118 if (zone == NULL) {
125 next = zone->first;
128 zone->first = next->next; /* first one is it, remove from list */
136 zone->notlifo++; /* not a LIFO free */
144 zone->total -= next->size;
150 zone->rogue++;
160 struct mem_zone *zone;
162 zone = malloc(sizeof(struct mem_zone));
163 assert(zone != NULL);
164 zone->first = NULL;
165 zone->total = 0;
166 zone->highwater = 0;
167 zone->limit = 0;
168 zone->notlifo = 0;
169 zone->rogue = 0;
170 strm->opaque = zone;
178 struct mem_zone *zone = strm->opaque;
180 zone->limit = limit;
186 struct mem_zone *zone = strm->opaque;
188 fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total);
194 struct mem_zone *zone = strm->opaque;
196 fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater);
199 /* release the memory allocation zone -- if there are any surprises, notify */
204 struct mem_zone *zone = strm->opaque;
210 item = zone->first;
220 if (count || zone->total)
222 prefix, zone->total, count);
223 if (zone->notlifo)
224 fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo);
225 if (zone->rogue)
227 prefix, zone->rogue);
229 /* free the zone and delete from the stream */
230 free(zone);