Ignore:
Timestamp:
Jan 28, 2014, 10:49:57 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
16a41cc
Parents:
a850d04
git-author:
Sebastian Huber <sebastian.huber@…> (01/28/14 10:49:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/04/14 09:06:34)
Message:

score: Add _Heap_Size_with_overhead()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/malloctest/init.c

    ra850d04 ra49bc35  
    11581158}
    11591159
     1160static void test_heap_size_with_overhead(void)
     1161{
     1162  uintptr_t s;
     1163
     1164  puts( "_Heap_Size_with_overhead" );
     1165
     1166  s = _Heap_Size_with_overhead(0, 0, 0);
     1167  rtems_test_assert(s == HEAP_BLOCK_HEADER_SIZE + CPU_ALIGNMENT - 1);
     1168
     1169  s = _Heap_Size_with_overhead(CPU_ALIGNMENT, 0, 0);
     1170  rtems_test_assert(s == HEAP_BLOCK_HEADER_SIZE + CPU_ALIGNMENT - 1);
     1171
     1172  s = _Heap_Size_with_overhead(CPU_ALIGNMENT, 0, 2 * CPU_ALIGNMENT);
     1173  rtems_test_assert(s == HEAP_BLOCK_HEADER_SIZE + 2 * CPU_ALIGNMENT - 1);
     1174
     1175  s = _Heap_Size_with_overhead(CPU_ALIGNMENT, 123, 0);
     1176  rtems_test_assert(s == HEAP_BLOCK_HEADER_SIZE + CPU_ALIGNMENT - 1 + 123);
     1177}
     1178
    11601179/*
    11611180 *  A simple test of posix_memalign
     
    12691288  test_heap_no_extend();
    12701289  test_heap_info();
     1290  test_heap_size_with_overhead();
    12711291  test_protected_heap_info();
    12721292  test_rtems_heap_allocate_aligned_with_boundary();
Note: See TracChangeset for help on using the changeset viewer.