version 1.15, 1998/09/29 18:09:29 |
version 1.16, 1998/12/16 04:28:23 |
Line 109 static void pr_rmpage __P((struct pool * |
|
Line 109 static void pr_rmpage __P((struct pool * |
|
static int pool_prime_page __P((struct pool *, caddr_t)); |
static int pool_prime_page __P((struct pool *, caddr_t)); |
static void *pool_page_alloc __P((unsigned long, int, int)); |
static void *pool_page_alloc __P((unsigned long, int, int)); |
static void pool_page_free __P((void *, unsigned long, int)); |
static void pool_page_free __P((void *, unsigned long, int)); |
int pool_chk __P((struct pool *, char *)); |
|
|
|
|
|
#ifdef POOL_DIAGNOSTIC |
#ifdef POOL_DIAGNOSTIC |
Line 324 pool_init(pp, size, align, ioff, flags, |
|
Line 323 pool_init(pp, size, align, ioff, flags, |
|
void (*release) __P((void *, unsigned long, int)); |
void (*release) __P((void *, unsigned long, int)); |
int mtype; |
int mtype; |
{ |
{ |
int off, slack; |
int off, slack, i; |
|
|
/* |
/* |
* Check arguments and construct default values. |
* Check arguments and construct default values. |
Line 387 pool_init(pp, size, align, ioff, flags, |
|
Line 386 pool_init(pp, size, align, ioff, flags, |
|
/* The page header will be taken from our page header pool */ |
/* The page header will be taken from our page header pool */ |
pp->pr_phoffset = 0; |
pp->pr_phoffset = 0; |
off = pagesz; |
off = pagesz; |
memset(pp->pr_hashtab, 0, sizeof(pp->pr_hashtab)); |
for (i = 0; i < PR_HASHTABSIZE; i++) { |
|
LIST_INIT(&pp->pr_hashtab[i]); |
|
} |
} |
} |
|
|
/* |
/* |
Line 1034 pool_chk(pp, label) |
|
Line 1035 pool_chk(pp, label) |
|
caddr_t page; |
caddr_t page; |
|
|
page = (caddr_t)((u_long)ph & pp->pr_pagemask); |
page = (caddr_t)((u_long)ph & pp->pr_pagemask); |
if (page != ph->ph_page) { |
if (page != ph->ph_page && (pp->pr_flags & PR_PHINPAGE) != 0) { |
if (label != NULL) |
if (label != NULL) |
printf("%s: ", label); |
printf("%s: ", label); |
printf("pool(%s): page inconsistency: page %p;" |
printf("pool(%p:%s): page inconsistency: page %p;" |
" at page head addr %p (p %p)\n", |
" at page head addr %p (p %p)\n", pp, |
pp->pr_wchan, ph->ph_page, |
pp->pr_wchan, ph->ph_page, |
ph, page); |
ph, page); |
r++; |
r++; |
Line 1067 pool_chk(pp, label) |
|
Line 1068 pool_chk(pp, label) |
|
|
|
if (label != NULL) |
if (label != NULL) |
printf("%s: ", label); |
printf("%s: ", label); |
printf("pool(%s): page inconsistency: page %p;" |
printf("pool(%p:%s): page inconsistency: page %p;" |
" item ordinal %d; addr %p (p %p)\n", |
" item ordinal %d; addr %p (p %p)\n", pp, |
pp->pr_wchan, ph->ph_page, |
pp->pr_wchan, ph->ph_page, |
n, pi, page); |
n, pi, page); |
r++; |
r++; |