The two cases are:

/sys/src/9/pc/mmu.c:510,513
                        if(didmmuinit)
                                map = xspanalloc(BY2PG, BY2PG, 0);
                        else
                                map = rampage();

xspanalloc returns zeroed memory.  rampage is only called early
in startup, and returns virgin memory which in the olden days
would have been zeroed at boot time.  But nowadays:

/sys/src/9/pc/memory.c:443
                        /* memset(va, 0, MB); so damn slow to memset all of 
memory */

So I think you want to clear the page only for the rampage case.


Reply via email to