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