Lines Matching defs:desc
46 void protect_allocations(struct allocator_struct *desc)
48 desc->blobs = NULL;
51 void drop_all_allocations(struct allocator_struct *desc)
53 struct allocation_blob *blob = desc->blobs;
55 desc->blobs = NULL;
56 desc->allocations = 0;
57 desc->total_bytes = 0;
58 desc->useful_bytes = 0;
59 desc->freelist = NULL;
62 blob_free(blob, desc->chunking);
67 void free_one_entry(struct allocator_struct *desc, void *entry)
70 *p = desc->freelist;
71 desc->freelist = p;
74 void *allocate(struct allocator_struct *desc, unsigned int size)
76 unsigned long alignment = desc->alignment;
77 struct allocation_blob *blob = desc->blobs;
87 if (desc->freelist) {
88 void **p = desc->freelist;
90 desc->freelist = *p;
98 desc->allocations++;
99 desc->useful_bytes += size;
102 unsigned int offset, chunking = desc->chunking;
108 desc->total_bytes += chunking;
111 desc->blobs = newblob;