Changes in uspace/lib/c/generic/malloc.c [33b8d024:582a0b8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/malloc.c
r33b8d024 r582a0b8 196 196 static futex_t malloc_futex = FUTEX_INITIALIZER; 197 197 198 #define malloc_assert(expr) safe_assert(expr) 198 #ifndef NDEBUG 199 200 #define malloc_assert(expr) \ 201 do { \ 202 if (!(expr)) {\ 203 heap_unlock(); \ 204 assert_abort(#expr, __FILE__, __LINE__); \ 205 } \ 206 } while (0) 207 208 #else /* NDEBUG */ 209 210 #define malloc_assert(expr) 211 212 #endif /* NDEBUG */ 213 199 214 200 215 #ifdef FUTEX_UPGRADABLE … … 396 411 397 412 /* Resize the address space area */ 398 errno_t ret = as_area_resize(area->start, asize, 0);413 int ret = as_area_resize(area->start, asize, 0); 399 414 if (ret != EOK) 400 415 return false; … … 489 504 490 505 /* Resize the address space area */ 491 errno_t ret = as_area_resize(area->start, asize, 0);506 int ret = as_area_resize(area->start, asize, 0); 492 507 if (ret != EOK) 493 508 abort(); … … 874 889 * 875 890 */ 876 void *realloc(void * const addr, const size_t size) 877 { 878 if (size == 0) { 879 free(addr); 880 return NULL; 881 } 882 891 void *realloc(const void *addr, const size_t size) 892 { 883 893 if (addr == NULL) 884 894 return malloc(size); … … 988 998 * 989 999 */ 990 void free( void * constaddr)1000 void free(const void *addr) 991 1001 { 992 1002 if (addr == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.