Subject: CLBYTES undefined in kern_malloc.c for vax port
To: None <,>
From: NetBSD Mailing list <>
List: current-users
Date: 12/11/1999 20:42:09
I've been experiencing the following in kern_malloc of the vax port for the
last three days:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes  -Wpointer-arith -Wno-main -mno-pic -I. -I../../../../arch -I../../../.. -nostdinc -I../../../../../gnu/sys -DVAX630 -DVAX650 -DVAX410 -DVAX43 -DCOMPAT_VAX1K -DLKM -DMAXUSERS=16 -D_KERNEL  -D_VAX_INLINE_  -c ../../../../kern/kern_malloc.c
../../../../kern/kern_malloc.c: In function `kmeminit':
../../../../kern/kern_malloc.c:611: `CLBYTES' undeclared (first use in this function)
../../../../kern/kern_malloc.c:611: (Each undeclared identifier is reported only once

The offending code is in the kmeminit() function of kern_malloc.c:

611:        npg = VM_KMEM_SIZE/ NBPG;

A grep(1) of the entire /usr/src tree indicates CLBYTES references as follows:

#define CLBYTES                 PAGE_SIZE
                curbufsize = CLBYTES * (i < residual ? base + 1 : base);
                        curbuf += CLBYTES;
                        curbufsize -= CLBYTES;
        format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES); 
         * Don't dump on the first CLBYTES (why CLBYTES?) in case the dump
        if (dumplo < btodb(CLBYTES))
                dumplo = btodb(CLBYTES);
                                    malloc(CLBYTES, M_TEMP, M_WAITOK);
                                bzero(zeropage, CLBYTES);
                        c = min(iov->iov_len, CLBYTES);
#define CLBYTES                 PAGE_SIZE
#define CLBYTES                 PAGE_SIZE

This doesn't provide enough information for me to make an assumption.  Additionally,
the widespread use of MCLBYTES (note the M) confuses the issue more.

Has anyone resolved this issue on their own for the VAX platform?

Scott G. Akmentins-Taylor     InterNet:
MRY Systems	
    (Skots Gregorijs Akmentins-Teilors -- just call me "Skots")
		----- Labak miris neka sarkans -----