Skip to content

Commit

Permalink
Revert "TESTS: Reduce allocate memory size"
Browse files Browse the repository at this point in the history
This reverts commit 6649e95.

In the malloc test, `ALLOC_ARRAY_SIZE` defines the *capacity* of array
that stores pointers to `malloc`'d buffers. It is *not* the number
of allocations.

In an ideal scenario, the test makes as many allocations as possible
until the heap runs out and malloc() returns NULL. So revert the
capacity of the array of pointers from 50 back to 100 so this array
is less likely to run out.
  • Loading branch information
LDong-Arm committed Sep 1, 2021
1 parent 0d65740 commit d158822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void test_multithread_allocation(void)
#endif

/** Test for multiple heap alloc and free calls */
#define ALLOC_ARRAY_SIZE 50
#define ALLOC_ARRAY_SIZE 100
#define ALLOC_LOOP 20
#define SIZE_INCREMENTS 1023
#define SIZE_MODULO 31
Expand Down

0 comments on commit d158822

Please sign in to comment.