X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ftest-framework%2Fbasic-tests%2Fdtest.c;h=8b58762351bd4fa86938cdeea7a65f7216952a71;hb=0ca67da389c41a10ba51b85905a2437669c0471d;hp=1a98bcb18d17ced144f73d389893af8bb05e0f7d;hpb=b19d3c9f0ada46534e44308f72d7e70ab1e301ee;p=yaffs2.git diff --git a/direct/test-framework/basic-tests/dtest.c b/direct/test-framework/basic-tests/dtest.c index 1a98bcb..8b58762 100644 --- a/direct/test-framework/basic-tests/dtest.c +++ b/direct/test-framework/basic-tests/dtest.c @@ -3406,11 +3406,33 @@ void rmdir_test2(void) try_rmdir("/nand/z/"); } + +void dump_yaffs_malloc_usage(void) +{ + unsigned current; + unsigned high_water; + + yaffsfs_get_malloc_values(¤t, &high_water); + + printf("\n" + "***************************************\n" + "Dump of yaffs malloc usage during run\n" + "Currently allocated : %u bytes\n" + "High water allocated : %u bytes\n" + "Note, this is not accurate on all platforms\n", + current, high_water); + +} + + int random_seed; int simulate_power_failure; int main(int argc, char *argv[]) { + + atexit(dump_yaffs_malloc_usage); + (void) argc; (void) argv; @@ -3454,7 +3476,7 @@ int main(int argc, char *argv[]) //long_test_on_path("/ram2k"); // long_test_on_path("/flash"); //simple_rw_test("/flash/flash"); - //fill_disk_test("/flash/flash"); + //fill_disk_test("/nand"); // rename_over_test("/flash"); //lookup_test("/flash"); //freespace_test("/flash/flash");