File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,9 @@ static int mm_stress_test(int argc, FAR char *argv[])
318
318
int prio = 0 ;
319
319
int size ;
320
320
int i ;
321
+ int maxsize = 1024 ;
321
322
322
- while ((i = getopt (argc , argv , "d:p:" )) != ERROR )
323
+ while ((i = getopt (argc , argv , "d:p:s: " )) != ERROR )
323
324
{
324
325
if (i == 'd' )
325
326
{
@@ -329,6 +330,10 @@ static int mm_stress_test(int argc, FAR char *argv[])
329
330
{
330
331
prio = atoi (optarg );
331
332
}
333
+ else if (i == 's' )
334
+ {
335
+ maxsize = atoi (optarg );
336
+ }
332
337
else
333
338
{
334
339
printf ("Unrecognized option: '%c'\n" , i );
@@ -347,7 +352,7 @@ static int mm_stress_test(int argc, FAR char *argv[])
347
352
348
353
while (1 )
349
354
{
350
- size = random () % 1024 + 1 ;
355
+ size = random () % maxsize + 1 ;
351
356
tmp = malloc (size );
352
357
assert (tmp );
353
358
You can’t perform that action at this time.
0 commit comments