summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/heapallocate.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-09 14:58:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-09 14:58:37 +0000
commit518c2aeba262cdad2c58bf581c7a49c2966d6569 (patch)
tree8944a4cd0377ca9ed3afd4a81642f9e95105bd63 /cpukit/score/src/heapallocate.c
parentRemove. (diff)
downloadrtems-518c2aeba262cdad2c58bf581c7a49c2966d6569.tar.bz2
2009-09-09 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* score/include/rtems/score/heap.h, score/inline/rtems/score/heap.inl, score/src/heapallocate.c, score/src/heap.c, score/src/heapextend.c, score/src/heapresizeblock.c, score/src/heapwalk.c: Documenation. Simplified block resize. Improved heap walk. Changed heap layout to avoid a special case for _Heap_Is_used() and _Heap_Is_free(). * libmisc/stackchk/check.c: Update for heap API changes.
Diffstat (limited to 'cpukit/score/src/heapallocate.c')
-rw-r--r--cpukit/score/src/heapallocate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/score/src/heapallocate.c b/cpukit/score/src/heapallocate.c
index 7b0f51e232..a1c6810eb8 100644
--- a/cpukit/score/src/heapallocate.c
+++ b/cpukit/score/src/heapallocate.c
@@ -48,7 +48,6 @@
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
- uintptr_t const alloc_area_size = alloc_area_offset + alloc_size;
_HAssert( block_size >= min_block_size );
_HAssert( block_begin < block_end );
@@ -206,6 +205,9 @@ void *_Heap_Allocate_aligned_with_boundary(
}
if ( alloc_begin != 0 ) {
+ /* Statistics */
+ stats->searches += search_count;
+
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
_Heap_Check_allocation(
@@ -216,9 +218,6 @@ void *_Heap_Allocate_aligned_with_boundary(
alignment,
boundary
);
-
- /* Statistics */
- stats->searches += search_count;
}
/* Statistics */