Changeset 63415655 in rtems for cpukit/include/rtems/score/protectedheap.h
- Timestamp:
- 05/22/23 13:58:27 (7 months ago)
- Branches:
- master
- Children:
- 0c3d6f58
- Parents:
- bdb4bc4
- git-author:
- Joel Sherrill <joel@…> (05/22/23 13:58:27)
- git-committer:
- Joel Sherrill <joel@…> (05/26/23 15:12:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/include/rtems/score/protectedheap.h
rbdb4bc4 r63415655 164 164 165 165 /** 166 * @brief Returns the size of the allocatable memory area.167 *168 * The size value may be greater than the initially requested size in169 * _Heap_Allocate_aligned_with_boundary().170 *171 * Inappropriate values for @a addr will not corrupt the heap, but may yield172 * invalid size values.173 *174 * This method first locks the allocator and after the operation, unlocks it again.175 *176 * @param heap The heap to operate upon.177 * @param addr The starting address of the allocatable memory area.178 * @param[out] size Stores the size of the allocatable memory area after the method call.179 *180 * @retval true The operation was successful.181 * @retval false The operation was not successful.182 */183 bool _Protected_heap_Get_block_size(184 Heap_Control *heap,185 void *addr,186 uintptr_t *size187 );188 189 /**190 * @brief Resizes the block of the allocated memory area.191 *192 * Inappropriate values for @a addr may corrupt the heap.193 *194 * This method first locks the allocator and after the resize, unlocks it again.195 *196 * @param[in, out] heap The heap to operate upon.197 * @param addr The starting address of the allocated memory area to be resized.198 * @param size The least possible size for the new memory area. Resize may be199 * impossible and depends on the current heap usage.200 * @param[out] old_size Stores the size available for allocation in the current201 * block before the resize after the method call.202 * @param[out] new_size Stores the size available for allocation in the resized203 * block after the method call. In the case of an unsuccessful resize,204 * zero is returned in this parameter205 *206 * @retval HEAP_RESIZE_SUCCESSFUL The resize was successful.207 * @retval HEAP_RESIZE_UNSATISFIED The least possible size @a size was too big.208 * Resize not possible.209 * @retval HEAP_RESIZE_FATAL_ERROR The block starting at @a addr is not part of210 * the heap.211 */212 bool _Protected_heap_Resize_block(213 Heap_Control *heap,214 void *addr,215 uintptr_t size216 );217 218 /**219 166 * @brief Frees the allocated memory area. 220 167 * … … 246 193 247 194 /** 248 * @brief Iterates over all blocks of the heap.249 *250 * This method first locks the allocator and after the operation, unlocks it again.251 *252 * @param[in, out] heap The heap to iterate over.253 * @param visitor This will be called for each heap block with254 * the argument @a visitor_arg.255 * @param[in, out] visitor_arg The argument for all calls of @a visitor.256 */257 void _Protected_heap_Iterate(258 Heap_Control *heap,259 Heap_Block_visitor visitor,260 void *visitor_arg261 );262 263 /**264 195 * @brief Returns information about used and free blocks for the heap. 265 196 *
Note: See TracChangeset
for help on using the changeset viewer.