diff options
author | Tom Rini <trini@konsulko.com> | 2020-01-09 08:52:21 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-09 08:52:21 -0500 |
commit | d6b92b9742f125542dd0985976c3a6c560ed40fd (patch) | |
tree | df47458afa5280a80aa6ea789ac4d935aabe64ed /test/ut.c | |
parent | a74a2134b245d19a999c796d29285597a22954ed (diff) | |
parent | aaa05deb1283b6beb7334adfa4094fb6bd4ab750 (diff) |
Merge tag 'dm-pull-8jan20' of git://git.denx.de/u-boot-dm
dm: Increased separation of ofdata_to_platdata() and probe methods
Diffstat (limited to 'test/ut.c')
-rw-r--r-- | test/ut.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ut.c b/test/ut.c index 55798041baf..265da4a0d89 100644 --- a/test/ut.c +++ b/test/ut.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <malloc.h> #include <test/test.h> #include <test/ut.h> @@ -32,3 +33,16 @@ void ut_failf(struct unit_test_state *uts, const char *fname, int line, putc('\n'); uts->fail_count++; } + +ulong ut_check_free(void) +{ + struct mallinfo info = mallinfo(); + + return info.uordblks; +} + +long ut_check_delta(ulong last) +{ + return ut_check_free() - last; +} + |