Skip to content

Commit 8e41298

Browse files
committed
Revert "TESTS: Reduce allocate memory size"
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 before the heap does.
1 parent 8d32b66 commit 8e41298

File tree

1 file changed

+1
-1
lines changed
  • rtos/tests/TESTS/mbed_rtos/malloc

1 file changed

+1
-1
lines changed

rtos/tests/TESTS/mbed_rtos/malloc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void test_multithread_allocation(void)
106106
#endif
107107

108108
/** Test for multiple heap alloc and free calls */
109-
#define ALLOC_ARRAY_SIZE 50
109+
#define ALLOC_ARRAY_SIZE 100
110110
#define ALLOC_LOOP 20
111111
#define SIZE_INCREMENTS 1023
112112
#define SIZE_MODULO 31

0 commit comments

Comments
 (0)