Re: __alloc_pages: 2-order allocation failed
Linux psychmon 2.4.27 #1 SMP Thu Apr 21 14:46:02 EDT 2005 sparc64
GNU/Linux
Shocking. The brackets actually helped. :P
Thanks again. Now, with a little luck, I can figure out where things
are going wrong.
On Thu, Apr 21, 2005 at 02:40:43PM -0400, Mike Edwards said:
> Whoops. You're right...
>
> Thanks. I'll give it another try.
>
>
> On Thu, Apr 21, 2005 at 07:24:46PM +0200, Frans Pop said:
> > On Thursday 21 April 2005 14:53, Mike Edwards wrote:
> > > unsigned long __get_free_pages(unsigned int gfp_mask, unsigned int
> > > order) {
> > > struct page * page;
> > >
> > > page = alloc_pages(gfp_mask, order);
> > > if (!page) {
> > ^^^
> > > if (order > 0)
> > > printk("DEBUG: __get_free_pages() order %d
> > > failed " "called by %p\n",
> > > order, __builtin_return_address(0));
> > > return 0;
> > }
> > ^^^
> > > return (unsigned long) page_address(page);
> > > }
> >
> > You've forgotten to add the brackets for the if (!page) statement so now
> > the return 0 is always executed...
> > I've added them above.
>
>
>
> --
> Mike Edwards <sauron-debian-sparc@psychology.rutgers.edu>
> System Administrator
> Psychology Department, Rutgers University, Newark campus
>
>
> --
> To UNSUBSCRIBE, email to debian-sparc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
Mike Edwards <sauron-debian-sparc@psychology.rutgers.edu>
System Administrator
Psychology Department, Rutgers University, Newark campus
Reply to: