test show free mem before/after

This commit is contained in:
Mathieu Maret 2021-10-30 00:37:26 +02:00
parent 79a2bc58ae
commit 2c4ade0fca
1 changed files with 7 additions and 1 deletions

View File

@ -145,7 +145,7 @@ void testAlloc(void)
free(alloc16); free(alloc16);
} }
static void testPaging(void) void testPaging(void)
{ {
printf("Testing paging\n"); printf("Testing paging\n");
struct phyMemDesc *allocated_page_list; struct phyMemDesc *allocated_page_list;
@ -383,6 +383,10 @@ static void testMMUContext()
void run_test(void) void run_test(void)
{ {
uint freemem, usedmem;
uint afterFreemem, afterUsedmem;
memGetStat(&freemem, &usedmem);
testATA(); testATA();
testMemcpyPerf(); testMemcpyPerf();
{ {
@ -416,4 +420,6 @@ void run_test(void)
testCoroutine(); testCoroutine();
testKthread(); testKthread();
testMMUContext(); testMMUContext();
memGetStat(&afterFreemem, &afterUsedmem);
printf("free %d -> %d\n", freemem, afterFreemem);
} }