comparison packages/redboot/current/src/main.c @ 2887:22da989aafa4

Add support for memalloc heaps in RedBoot. See ChangeLogs for details.
author nickg
date Thu, 25 Jun 2009 10:30:59 +0000
parents 0a6b9353eb80
children
comparison
equal deleted inserted replaced
2886:7c9e64d8c436 2887:22da989aafa4
298 if ( ram_end < workspace_end ) { 298 if ( ram_end < workspace_end ) {
299 // when *less* SDRAM is installed than the possible maximum, 299 // when *less* SDRAM is installed than the possible maximum,
300 // but the heap1 region remains greater... 300 // but the heap1 region remains greater...
301 workspace_end = ram_end; 301 workspace_end = ram_end;
302 } 302 }
303
304 #if defined(CYGMEM_REDBOOT_WORKSPACE_HEAP)
305 {
306 extern cyg_bool cyg_memalloc_heap_reinit( cyg_uint8 *base, cyg_uint32 size );
307
308 workspace_end -= CYGMEM_REDBOOT_WORKSPACE_HEAP_SIZE;
309
310 if( !cyg_memalloc_heap_reinit( (cyg_uint8 *)workspace_end, CYGMEM_REDBOOT_WORKSPACE_HEAP_SIZE ) )
311 diag_printf("Heap reinitialization failed\n");
312 }
313 #endif
303 314
304 workspace_end_init=workspace_end; 315 workspace_end_init=workspace_end;
305 316
306 // Nothing has ever been loaded into memory 317 // Nothing has ever been loaded into memory
307 entry_address = (unsigned long)NO_MEMORY; 318 entry_address = (unsigned long)NO_MEMORY;