Skip to content

Commit

Permalink
small supplement for PR ARMmbed#5338
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejbocianski committed Nov 3, 2017
1 parent 6912a9d commit 0151b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ int main()
{
// static stack for threads to reduce heap usage on devices with small RAM
// and eliminate run out of heap memory problem
MBED_ALIGN(8) uint8_t stack[THREAD_STACK_SIZE * NUM_THREADS];
uint8_t stack[NUM_THREADS][THREAD_STACK_SIZE];

Thread *thread_list[NUM_THREADS];
int test_time = 15;
GREENTEA_SETUP(20, "default_auto");

// Allocate threads for the test
for (int i = 0; i < NUM_THREADS; i++) {
thread_list[i] = new Thread(osPriorityNormal, THREAD_STACK_SIZE, stack + i * THREAD_STACK_SIZE);
thread_list[i] = new Thread(osPriorityNormal, THREAD_STACK_SIZE, stack[i]);
if (NULL == thread_list[i]) {
allocation_failure = true;
} else {
Expand Down

0 comments on commit 0151b1c

Please sign in to comment.