From a1af48a8cf6965743c30295b2adddfbe3709e587 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 3 Jan 2023 11:55:51 +0000 Subject: [PATCH] Fix and improve documentation in heap.h (issue #232) --- system/heap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/heap.h b/system/heap.h index 4c7e0ef..f2e60d1 100644 --- a/system/heap.h +++ b/system/heap.h @@ -32,9 +32,9 @@ void heap_init(void); * region will be at least the requested size with the requested alignment. * This memory is always mapped to the identical address in virtual memory. * + * \param heap_id - the target heap. * \param size - the requested size in bytes. * \param alignment - the requested byte alignment (must be a power of 2). - * \param heap - the heap on which this allocation shall be performed. * * \returns * On success, the allocated address in physical memory. On failure, 0. @@ -46,6 +46,8 @@ uintptr_t heap_alloc(heap_type_t heap_id, size_t size, uintptr_t alignment); * memory heap. This value may be passed to heap_rewind() to free any * memory from that heap allocated after this call. * + * \param heap_id - the target heap. + * * \returns * An opaque value indicating the current allocation state. */ @@ -55,8 +57,8 @@ uintptr_t heap_mark(heap_type_t heap_id); * Frees any memory allocated in the given heap since the specified mark was * obtained from a call to heap_mark(). * + * \param heap_id - the target heap. * \param mark - the mark that indicates how much memory to free. - * \param heap - the heap on which this rewind shall be performed. */ void heap_rewind(heap_type_t heap_id, uintptr_t mark);