Lines Matching refs:item
59 struct mem_item *next; /* pointer to next item in list, or NULL */
64 struct mem_item *first; /* pointer to first item in list, or NULL */
74 struct mem_item *item;
89 /* create a new item for the list */
90 item = malloc(sizeof(struct mem_item));
91 if (item == NULL) {
95 item->ptr = ptr;
96 item->size = len;
98 /* insert item at the beginning of the list */
99 item->next = zone->first;
100 zone->first = item;
103 zone->total += item->size;
114 struct mem_item *item, *next;
123 /* point next to the item that matches ptr, or NULL if not found -- remove
124 the item from the linked list if found */
131 item = next;
132 next = item->next;
135 item->next = next->next;
142 /* if found, update the statistics and free the item */
203 struct mem_item *item, *next;
209 /* free leftover allocations and item structures, if any */
210 item = zone->first;
211 while (item != NULL) {
212 free(item->ptr);
213 next = item->next;
214 free(item);
215 item = next;