*free = 0;
for (i=NR_MEMS-1; i>=0; i--) {
if (chunks[i].size > 0) {
- printf("mem_init: adding (clicks) 0x%x @ 0x%x\n",
- chunks[i].size, chunks[i].base);
free_mem(chunks[i].base, chunks[i].size);
*free += chunks[i].size;
#if ENABLE_SWAP
}
high <<= CLICK_SHIFT;
+#if VERBOSE_VM
printf("do_x86_vm: found high 0x%x\n", high);
+#endif
/* The number of pages we need is one for the page directory, enough
* page tables to cover the memory, and one page for alignement.
bytes= pages*PAGE_SIZE;
clicks= (bytes + CLICK_SIZE-1) >> CLICK_SHIFT;
+#if VERBOSE_VM
printf("do_x86_vm: need %d pages\n", pages);
printf("do_x86_vm: need %d bytes\n", bytes);
printf("do_x86_vm: need %d clicks\n", clicks);
+#endif
for (i= 0; i<NR_MEMS; i++)
{
mem_chunks[i].base += clicks;
mem_chunks[i].size -= clicks;
+#if VERBOSE_VM
printf("do_x86_vm: using 0x%x clicks @ 0x%x\n", clicks, base_click);
+#endif
r= sys_vm_setbuf(base_click << CLICK_SHIFT, clicks << CLICK_SHIFT,
high);
if (r != 0)