| 23 | pthread_mutex_t global_malloc_lock; |
| 24 | |
| 25 | static 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 | |
| 37 | void free(void *block) |
| 38 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…