version 1.3, 2007/10/16 12:48:51 |
version 1.5, 2007/10/16 13:47:39 |
|
|
#include <sys/mem.h> |
#include <sys/mem.h> |
#include <libkern/printf.h> |
#include <libkern/printf.h> |
|
|
#define KMEM_DEBUG |
/* #define KMEM_DEBUG */ |
|
|
#ifdef KMEM_DEBUG |
#ifdef KMEM_DEBUG |
#define DPRINTF(x...) do { printf(x); } while (0) |
#define DPRINTF(x...) do { printf(x); } while (0) |
|
|
/* rewind pointer to the first byte */ |
/* rewind pointer to the first byte */ |
firstpageptr = lastpageptr - ((npages - 1)); |
firstpageptr = lastpageptr - ((npages - 1)); |
|
|
offbits = mask ? mask - 1 : mask; /* XXX */ |
offbits = nmbmbits; |
/* fill this (npages pages) region with zeroes */ |
/* fill this (npages pages) region with zeroes */ |
while(firstpageptr <= lastpageptr) { |
while(firstpageptr <= lastpageptr) { |
|
|