summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/heap.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 20:11:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 20:11:33 +0000
commit493e405cac79d7d0f810f051394c616011ce9ffb (patch)
treeea1e338132aeb5b91e785340efb375b0d537d1cb /cpukit/score/src/heap.c
parentnewlib-1.15.0-rtems4.8-20070912.diff. (diff)
downloadrtems-493e405cac79d7d0f810f051394c616011ce9ffb.tar.bz2
2007-09-12 Sergei Organov <osv@javad.com>
PR 1258/rtems * cpukit/score/src/heapallocatealigned.c (block_allocate): New routine. * cpukit/score/src/heapallocatealigned.c (_Heap_Allocate_aligned): Use block_allocate() instead of _Heap_Block_allocate(). Replace _Heap_Head(the_heap)->next with equivalent _Heap_First(the_heap). * cpukit/score/src/heap.c (_Heap_Allocate): fix comments according to changed block split strategy in _Heap_Allocate_aligned().
Diffstat (limited to 'cpukit/score/src/heap.c')
-rw-r--r--cpukit/score/src/heap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
index 5273678d1a..042dc6d604 100644
--- a/cpukit/score/src/heap.c
+++ b/cpukit/score/src/heap.c
@@ -65,11 +65,13 @@ static uint32_t instance = 0;
* | size < page_size |
* +--------------------------------+ <- end = begin + size
*
- * This is what a heap looks like after first allocation of SIZE bytes.
- * BSIZE stands for SIZE + 4 aligned up on 'page_size' boundary if allocation
- * has been performed by _Heap_Allocate(). If allocation has been performed
- * by _Heap_Allocate_aligned(), the block size BSIZE is defined differently
- * (see 'heapallocatealigned.c' for details).
+ * Below is what a heap looks like after first allocation of SIZE bytes using
+ * _Heap_allocate(). BSIZE stands for SIZE + 4 aligned up on 'page_size'
+ * boundary.
+ * [NOTE: If allocation were performed by _Heap_Allocate_aligned(), the
+ * block size BSIZE is defined differently, and previously free block will
+ * be split so that upper part of it will become used block (see
+ * 'heapallocatealigned.c' for details).]
*
* +--------------------------------+ <- begin = starting_address
* | unused space due to alignment |