Lines Matching refs:allocation
51 struct intmem_allocation* allocation;
58 list_for_each_entry_safe(allocation, tmp, &intmem_allocations, entry) {
59 int alignment = allocation->offset % align;
62 if (allocation->status == STATUS_FREE &&
63 allocation->size >= size + alignment) {
64 if (allocation->size > size + alignment) {
68 alloc->size = allocation->size - size -
70 alloc->offset = allocation->offset + size +
72 list_add(&alloc->entry, &allocation->entry);
77 tmp->offset = allocation->offset;
80 allocation->offset += alignment;
82 &allocation->entry);
85 allocation->status = STATUS_ALLOCATED;
86 allocation->size = size;
87 ret = (void*)((int)intmem_virtual + allocation->offset);
96 struct intmem_allocation* allocation;
105 list_for_each_entry_safe(allocation, tmp, &intmem_allocations, entry) {
106 if (allocation->offset == (int)(addr - intmem_virtual)) {
108 list_entry(allocation->entry.prev,
111 list_entry(allocation->entry.next,
114 allocation->status = STATUS_FREE;
118 prev->size += allocation->size;
119 list_del(&allocation->entry);
120 kfree(allocation);
121 allocation = prev;
125 allocation->size += next->size;