MCPcopy Create free account
hub / github.com/acl-dev/acl / get_free_block

Function get_free_block

test/libmm/memalloc.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23pthread_mutex_t global_malloc_lock;
24
25static header_t *get_free_block(size_t size)
26{
27 header_t *curr = head;
28 while(curr) {
29 /* see if there's a free block that can accomodate requested size */
30 if (curr->s.is_free && curr->s.size >= size)
31 return curr;
32 curr = curr->s.next;
33 }
34 return NULL;
35}
36
37void free(void *block)
38{

Callers 1

mymallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…