Re[2]: Bug in kernel code?

From: Stephen C. Biggs (s.biggs@softier.com)
Date: Tue Aug 27 2002 - 21:49:18 EST


On 27 Aug 2002 at 18:23, David S. Miller wrote:

> From: "Stephen C. Biggs" <s.biggs@softier.com>
> Date: Tue, 27 Aug 2002 18:24:13 -0700
>
> On 27 Aug 2002 at 18:09, David S. Miller wrote:
>
> > And then your mail ends.... let us know when you've fixed
> > your email client, this isn't rocket science :-)
> >
>
> What are you talking about "And then your mail ends..." That's all I wanted to say...
>
> No, I thought you were going to give an example of a huge number.
> :-)
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

Argh. I meant to post THIS code:

#include <stdio.h>

#define PAGE_SHIFT 12

struct list_head {
        struct list_head *next, *prev;
};

int main(void)
{
        unsigned long order;
        unsigned long mempages = ~0;

#if PAGE_SHIFT < 13
        mempages >>= (13 - PAGE_SHIFT);
#endif
        mempages *= sizeof(struct list_head);

        printf("mempages: %lu\n", mempages);

        for (order = 0; ((1UL << order) << PAGE_SHIFT) < mempages; order++)
                ;
        printf("%lu\n",order);
        return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:21 EST