diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 7c2e6c7870..e96b8c553f 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -429,14 +429,21 @@ static int bf_action_cb(int action, struct gui_synclist* list) | |||
429 | { | 429 | { |
430 | if (action == ACTION_STD_OK) | 430 | if (action == ACTION_STD_OK) |
431 | { | 431 | { |
432 | splash(HZ/1, "Attempting a 64k allocation"); | 432 | if (gui_synclist_get_sel_pos(list) == 0 && core_test_free()) |
433 | int handle = core_alloc("test", 64<<10); | 433 | { |
434 | splash(HZ/2, (handle > 0) ? "Success":"Fail"); | 434 | splash(HZ, "Freed test handle. New alloc should trigger compact"); |
435 | /* for some reason simplelist doesn't allow adding items here if | 435 | } |
436 | * info.get_name is given, so use normal list api */ | 436 | else |
437 | gui_synclist_set_nb_items(list, core_get_num_blocks()); | 437 | { |
438 | if (handle > 0) | 438 | splash(HZ/1, "Attempting a 64k allocation"); |
439 | core_free(handle); | 439 | int handle = core_alloc("test", 64<<10); |
440 | splash(HZ/2, (handle > 0) ? "Success":"Fail"); | ||
441 | /* for some reason simplelist doesn't allow adding items here if | ||
442 | * info.get_name is given, so use normal list api */ | ||
443 | gui_synclist_set_nb_items(list, core_get_num_blocks()); | ||
444 | if (handle > 0) | ||
445 | core_free(handle); | ||
446 | } | ||
440 | action = ACTION_REDRAW; | 447 | action = ACTION_REDRAW; |
441 | } | 448 | } |
442 | else if (action == ACTION_NONE) | 449 | else if (action == ACTION_NONE) |