Home | History | Annotate | Download | only in e2fsck

Lines Matching full:region

2  * region.c --- code which manages allocations within a region.
36 region_t region;
38 region = malloc(sizeof(struct region_struct));
39 if (!region)
41 memset(region, 0, sizeof(struct region_struct));
42 region->min = min;
43 region->max = max;
44 return region;
47 void region_free(region_t region)
51 for (r = region->allocated; r; r = next) {
55 memset(region, 0, sizeof(struct region_struct));
56 free(region);
59 int region_allocate(region_t region, region_addr_t start, int n)
65 if ((start < region->min) || (end > region->max))
73 * 1; if we can find an existing region which we can grow, do
75 * insert a new region element into the linked list.
77 for (r = region->allocated, prev=NULL; r; prev = r, r = r->next) {
104 * Insert a new region element structure into the linked list
115 region->allocated = new_region;
156 void region_print(region_t region, FILE *f)
161 fprintf(f, "Printing region (min=%d. max=%d)\n\t", region->min,
162 region->max);
163 for (r = region->allocated; r; r = r->next) {
185 printf("Creating region with args(%d, %d)\n",
189 fprintf(stderr, "Couldn't create region.\n");