Changeset bcd4dd4 in mainline
- Timestamp:
- 2018-11-13T20:19:10Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b0beb9b1
- Parents:
- fdc190f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/malloc.c
rfdc190f rbcd4dd4 36 36 #include <mem.h> 37 37 #include <main/main.h> // malloc_init() 38 #include <macros.h> 38 39 39 40 /** Minimum size to be allocated by malloc */ … … 82 83 } 83 84 84 static inline bool _is_pow2(size_t x)85 {86 return (x & (x - 1)) == 0;87 }88 89 85 static void _check_sizes(size_t *alignment, size_t *size) 90 86 { … … 97 93 98 94 /* Alignment must be a power of 2. */ 99 assert( _is_pow2(*alignment));95 assert(ispwr2(*alignment)); 100 96 assert(*alignment <= PAGE_SIZE); 101 97
Note:
See TracChangeset
for help on using the changeset viewer.