mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 19:25:39 +08:00
2010-07-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* malloctest/init.c: Added test for rtems_heap_allocate_aligned_with_boundary().
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2010-07-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* malloctest/init.c: Added test for
|
||||
rtems_heap_allocate_aligned_with_boundary().
|
||||
|
||||
2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac: Add new test to exercise devFS_Show().
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* Copyright (c) 2009 embedded brains GmbH.
|
||||
* Copyright (c) 2009, 2010 embedded brains GmbH.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
@@ -1023,6 +1023,20 @@ static void test_protected_heap_info(void)
|
||||
rtems_test_assert( rc == false );
|
||||
}
|
||||
|
||||
static void test_rtems_heap_allocate_aligned_with_boundary(void)
|
||||
{
|
||||
void *p = NULL;
|
||||
|
||||
p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1);
|
||||
rtems_test_assert( p != NULL );
|
||||
free(p);
|
||||
|
||||
_Thread_Disable_dispatch();
|
||||
p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1);
|
||||
_Thread_Enable_dispatch();
|
||||
rtems_test_assert( p == NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* A simple test of posix_memalign
|
||||
*/
|
||||
@@ -1108,6 +1122,7 @@ rtems_task Init(
|
||||
test_heap_extend();
|
||||
test_heap_info();
|
||||
test_protected_heap_info();
|
||||
test_rtems_heap_allocate_aligned_with_boundary();
|
||||
|
||||
test_posix_memalign();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user