MCPcopy Create free account
hub / github.com/coreboot/coreboot / alloc_range

Function alloc_range

src/lib/memrange.c:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static struct range_entry *alloc_range(struct memranges *ranges)
32{
33 if (ranges->free_list != NULL) {
34 struct range_entry *r;
35
36 r = ranges->free_list;
37 range_entry_unlink(&ranges->free_list, r);
38 return r;
39 }
40 if (ENV_PAYLOAD_LOADER)
41 return malloc(sizeof(struct range_entry));
42 return NULL;
43}
44
45static inline struct range_entry *
46range_list_add(struct memranges *ranges, struct range_entry **prev_ptr,

Callers 1

range_list_addFunction · 0.85

Calls 2

range_entry_unlinkFunction · 0.85
mallocFunction · 0.70

Tested by

no test coverage detected