[BACK]Return to kern_mem.c CVS log [TXT][DIR] Up to [local] / funnyos / kern

Diff for /funnyos/kern/kern_mem.c between version 1.1 and 1.2

version 1.1, 2007/10/16 09:41:04 version 1.2, 2007/10/16 12:43:11
Line 154 
Line 154 
   
                                         /* calculate pointer to this (last) page */                                          /* calculate pointer to this (last) page */
                                         lastpageptr = (uint32_t *)((allocbase + (8 * nmbmbytes * KMEM_PAGESIZE)) + (KMEM_PAGESIZE * nmbmbits));                                          lastpageptr = (uint32_t *)((allocbase + (8 * nmbmbytes * KMEM_PAGESIZE)) + (KMEM_PAGESIZE * nmbmbits));
                                         DPRINTF("lastpageptr=0x%x\n", lastpageptr);  
   
                                         /* rewind pointer to the first byte */                                          /* rewind pointer to the first byte */
                                         firstpageptr = lastpageptr - ((npages - 1));                                          firstpageptr = lastpageptr - ((npages - 1));
                                         DPRINTF("firstpageptr=0x%x\n", firstpageptr);  
   
                                         offbits = mask ? mask - 1 : mask;       /* XXX */                                          offbits = mask ? mask - 1 : mask;       /* XXX */
                                         /* fill this (npages pages) region with zeroes */                                          /* fill this (npages pages) region with zeroes */
Line 186 
Line 184 
                                         firstpageptr = lastpageptr - ((npages - 1));                                          firstpageptr = lastpageptr - ((npages - 1));
   
                                         /* got it */                                          /* got it */
                                         DPRINTF("allocated, addr=0x%x\n", firstpageptr);                                          DPRINTF("allocated, addr=0x%x len=0x%x [0x%x-0x%x]\n", firstpageptr, npages * KMEM_PAGESIZE, firstpageptr, lastpageptr);
   
                                         /* decrement system free pages */                                          /* decrement system free pages */
                                         freepages -= npages;                                          freepages -= npages;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb