Changeset 8ebe212 in mainline for uspace/lib/c
- Timestamp:
- 2018-04-13T12:39:06Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 18b6a88
- Parents:
- f712a85
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-12 17:38:04)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-13 12:39:06)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/malloc.c
rf712a85 r8ebe212 874 874 * 875 875 */ 876 void *realloc(void * 876 void *realloc(void *const addr, const size_t size) 877 877 { 878 878 if (size == 0) { … … 988 988 * 989 989 */ 990 void free(void * 990 void free(void *const addr) 991 991 { 992 992 if (addr == NULL) … … 996 996 997 997 /* Calculate the position of the header. */ 998 heap_block_head_t *head 999 =(heap_block_head_t *) (addr - sizeof(heap_block_head_t));998 heap_block_head_t *head = 999 (heap_block_head_t *) (addr - sizeof(heap_block_head_t)); 1000 1000 1001 1001 block_check(head); … … 1012 1012 1013 1013 /* Look at the next block. If it is free, merge the two. */ 1014 heap_block_head_t *next_head 1015 =(heap_block_head_t *) (((void *) head) + head->size);1014 heap_block_head_t *next_head = 1015 (heap_block_head_t *) (((void *) head) + head->size); 1016 1016 1017 1017 if ((void *) next_head < area->end) {
Note:
See TracChangeset
for help on using the changeset viewer.