/* * Test of Heap Walker * * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. * * $Id$ */ #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ #define CONFIGURE_INIT #include "system.h" #include #include #include #include #include #define TEST_HEAP_SIZE 1024 uint32_t TestHeapMemory[TEST_HEAP_SIZE]; Heap_Control TestHeap; void test_heap_init(void) { memset( TestHeapMemory, '\0', sizeof(TestHeapMemory) ); _Heap_Initialize( &TestHeap, TestHeapMemory, sizeof(TestHeapMemory), 0 ); } void test_heap_walk( int source, bool do_dump ) { int i, j, original; _Heap_Walk( &TestHeap, source, do_dump ); /* * Now corrupt all non-zero values */ for (i=0 ; i