1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2009. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #include <tmacros.h> |
---|
13 | |
---|
14 | uint32_t Memory[256]; |
---|
15 | |
---|
16 | rtems_task Init( |
---|
17 | rtems_task_argument ignored |
---|
18 | ) |
---|
19 | { |
---|
20 | Heap_Control Heap; |
---|
21 | uint32_t heap_size; |
---|
22 | void *ptr1; |
---|
23 | intptr_t old; |
---|
24 | intptr_t avail; |
---|
25 | Heap_Resize_status hc; |
---|
26 | |
---|
27 | puts( "\n\n*** TEST 63 ***" ); |
---|
28 | |
---|
29 | puts( "Init - _Heap_Initialize - OK" ); |
---|
30 | heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 ); |
---|
31 | printf( "Init - Heap size=%d\n", heap_size ); |
---|
32 | |
---|
33 | puts( "Init - _Heap_Allocate_aligned - OK"); |
---|
34 | ptr1 = _Heap_Allocate_aligned( &Heap, 64, 32 ); |
---|
35 | assert( ptr1 ); |
---|
36 | |
---|
37 | puts( "Init - _Heap_Resize_block - OK"); |
---|
38 | hc = _Heap_Resize_block( &Heap, ptr1, 4, &old, &avail ); |
---|
39 | assert( !hc ); |
---|
40 | |
---|
41 | puts( "*** END OF TEST 63 ***" ); |
---|
42 | |
---|
43 | rtems_test_exit(0); |
---|
44 | } |
---|
45 | |
---|
46 | /* configuration information */ |
---|
47 | |
---|
48 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
49 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
50 | |
---|
51 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
52 | #define CONFIGURE_MAXIMUM_REGIONS 1 |
---|
53 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
54 | |
---|
55 | #define CONFIGURE_INIT |
---|
56 | #include <rtems/confdefs.h> |
---|
57 | |
---|
58 | /* global variables */ |
---|