Re: 7.52 second kernel compile

Erik Andersen
2002-03-19T05:25:23Z

On Mon Mar 18, 2002 at 06:08:17PM -0800, Linus Torvalds wrote:
>
> On Mon, 18 Mar 2002, David S. Miller wrote:
> >
> > Or maybe the program is just flawed, and the interesting 1/8 pattern comes
> > from something else altogether.
> >
> > I think the weird Athlon behavior has to do with the fact that
> > you've made your little test program as much of a cache tester
> > as a TLB tester :-)
>
> Oh, I was assuming that malloc(BIG) would do a mmap() of MAP_ANONYMOUS,

Perhaps adding an explicit

void *malloc(size_t size)
{
void *result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
if (result == MAP_FAILED)
exit(EXIT_FAILURE);
* (size_t *) result = size;
return(result + sizeof(size_t));
}

would ensure libc isn't trying to do something sneaky,

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--