impove memory accounting

. the total amount of memory in the system didn't include the memory
	  used by the boot-time modules and some dynamic allocation by the
	  kernel at boot time (to map in VM). especially apparent on our
	  ARM board with 'only' 512MB of memory and a huge ramdisk.
	. also: *add* the VM loaded module to the freelist after it has
	  been allocated for & mapped in instead of cutting it *out* of the
	  freelist! so we get a few more MB free..

Change-Id: If37ac32b21c9d38610830e21421264da4f20bc4f
This commit is contained in:
Ben Gras
2013-02-08 19:11:42 +01:00
parent d1df256de9
commit 3bc6d7df06
11 changed files with 40 additions and 26 deletions

View File

@@ -97,6 +97,11 @@ phys_clicks alloc_mem(phys_clicks clicks, u32_t memflags)
return mem;
}
void mem_add_total_pages(int pages)
{
total_pages += pages;
}
/*===========================================================================*
* free_mem *
*===========================================================================*/