forked from Imagelibrary/rtems
malloc04: Fix for BSPs with multiple memory areas
Some BSPs provide multiple memory areas. Make them empty.
This commit is contained in:
committed by
Amar Takhar
parent
b65e36e2f4
commit
7215a3051a
@@ -125,6 +125,12 @@ rtems_task Init(
|
||||
sbrk_count = 0;
|
||||
offset = 256;
|
||||
_Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
|
||||
|
||||
/* Some BSPs provide multiple memory areas. Make them empty. */
|
||||
for ( i = 1; i < _Memory_Get_count( mem ); ++i ) {
|
||||
_Memory_Initialize_by_size( _Memory_Get_area( mem, i ), NULL, 0 );
|
||||
}
|
||||
|
||||
_Malloc_Initialize();
|
||||
|
||||
errno = 0;
|
||||
|
||||
Reference in New Issue
Block a user