libtests/malloc04: Prevent compiler optimizations

This commit is contained in:
Sebastian Huber
2013-05-10 12:10:14 +02:00
parent cfd8d7a3d7
commit 9deed9edbf
+6 -1
View File
@@ -41,7 +41,12 @@ void *rtems_heap_null_extend(
#endif
char Malloc_Heap[ 256 ] CPU_STRUCTURE_ALIGNMENT;
int sbrk_count;
/*
* Use volatile to prevent compiler optimizations due to the malloc() builtin.
*/
volatile int sbrk_count;
Heap_Control TempHeap;
size_t offset;