if (foodebug) printf("%x\n", look); if (badwordaddr((void*)look)) {
if (badwordaddr((vaddr_t)look)) {
size_memory(void){	volatile unsigned int *look;	unsigned int *max;	extern char *end;#define PATTERN   0x5a5a5a5a#define STRIDE    (4*1024) 	/* 4k at a time */#define Roundup(value, stride) (((unsigned)(value) + (stride) - 1) & ~((stride)-1))	/*	 * count it up.	 */	max = (void*)MAXPHYSMEM;	for (look = (void*)Roundup(end, STRIDE); look < max;	    look = (int*)((unsigned)look + STRIDE)) {		unsigned save;		/* if can't access, we've reached the end */		if (foodebug) printf("%x\n", look);		if (badwordaddr((void*)look)) {#if defined(DEBUG)			printf("%x\n", look);#endif			look = (int *)((int)look - STRIDE);			break;		}		/*		 * If we write a value, we expect to read the same value back.		 * We'll do this twice, the 2nd time with the opposite bit		 * pattern from the first, to make sure we check all bits.		 */		save = *look;		if (*look = PATTERN, *look != PATTERN)			break;		if (*look = ~PATTERN, *look != ~PATTERN)			break;		*look = save;	}	if ((look > (unsigned int *)0x01FFF000) && (cputyp == CPU_188)) {                /* temp hack to fake 32Meg on MVME188 */		look = (unsigned int *)0x01FFF000; 	}	physmem = btoc(trunc_page((unsigned)look)); /* in pages */	return (trunc_page((unsigned)look));}