File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
TESTS/mbedmicro-rtos-mbed/malloc Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,15 @@ int main()
56
56
{
57
57
// static stack for threads to reduce heap usage on devices with small RAM
58
58
// and eliminate run out of heap memory problem
59
- MBED_ALIGN ( 8 ) uint8_t stack[THREAD_STACK_SIZE * NUM_THREADS];
59
+ uint8_t stack[NUM_THREADS][THREAD_STACK_SIZE ];
60
60
61
61
Thread *thread_list[NUM_THREADS];
62
62
int test_time = 15 ;
63
63
GREENTEA_SETUP (20 , " default_auto" );
64
64
65
65
// Allocate threads for the test
66
66
for (int i = 0 ; i < NUM_THREADS; i++) {
67
- thread_list[i] = new Thread (osPriorityNormal, THREAD_STACK_SIZE, stack + i * THREAD_STACK_SIZE );
67
+ thread_list[i] = new Thread (osPriorityNormal, THREAD_STACK_SIZE, stack[i] );
68
68
if (NULL == thread_list[i]) {
69
69
allocation_failure = true ;
70
70
} else {
You can’t perform that action at this time.
0 commit comments