Changeset c828803 in mainline
- Timestamp:
- 2012-07-24T10:04:01Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f66c203d
- Parents:
- da287d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/malloc.c
rda287d1 rc828803 720 720 return NULL; 721 721 722 /* 723 * The size of the allocated block needs to be naturally 724 * aligned, because the footer structure also needs to reside 725 * on a naturally aligned address in order to avoid unaligned 726 * memory accesses. 727 */ 722 728 size_t gross_size = GROSS_SIZE(ALIGN_UP(size, BASE_ALIGN)); 723 729 … … 760 766 void *calloc(const size_t nmemb, const size_t size) 761 767 { 768 // FIXME: Check for overflow 769 762 770 void *block = malloc(nmemb * size); 763 771 if (block == NULL) … … 899 907 if (addr == NULL) 900 908 return; 901 909 902 910 futex_down(&malloc_futex); 903 911
Note:
See TracChangeset
for help on using the changeset viewer.