Changeset 94e75cf in mainline
- Timestamp:
- 2020-06-12T16:40:42Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 128359eb
- Parents:
- 265be8a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/malloc.c
r265be8a r94e75cf 81 81 (sizeof(heap_block_head_t) + sizeof(heap_block_foot_t)) 82 82 83 /** Calculate real size of a heap block. 84 * 85 * Add header and footer size. 86 * 87 */ 88 #define GROSS_SIZE(size) ((size) + STRUCT_OVERHEAD) 89 90 /** Calculate net size of a heap block. 91 * 92 * Subtract header and footer size. 93 * 94 */ 95 #define NET_SIZE(size) ((size) - STRUCT_OVERHEAD) 96 83 97 /** Overhead of each area. */ 84 98 #define AREA_OVERHEAD(size) \ 85 (ALIGN_UP(size + sizeof(heap_area_t), BASE_ALIGN)) 86 87 /** Calculate real size of a heap block. 88 * 89 * Add header and footer size. 90 * 91 */ 92 #define GROSS_SIZE(size) ((size) + STRUCT_OVERHEAD) 93 94 /** Calculate net size of a heap block. 95 * 96 * Subtract header and footer size. 97 * 98 */ 99 #define NET_SIZE(size) ((size) - STRUCT_OVERHEAD) 99 (ALIGN_UP(GROSS_SIZE(size) + sizeof(heap_area_t), BASE_ALIGN)) 100 100 101 101 /** Get first block in heap area.
Note:
See TracChangeset
for help on using the changeset viewer.