[EMAIL PROTECTED]>
Sent: Sunday, December 09, 2001 5:16 PM
Subject: Re: [Patch] - for memory.c
> Thanks for the catch!
>
> How about just adding the limit check back in.
>
> for (i=1; (size>i) && (i<0xff); i<<=1);
>
> Do you like the rest of the changes
Thanks for the catch!
How about just adding the limit check back in.
for (i=1; (size>i) && (i<0xff); i<<=1);
Do you like the rest of the changes I made to the algorithm?
David Jacobs
- Original Message -
From: "Sam Tregar" <[EMAIL PROTECTED]>
> > +for (i = 1; size > i; i <<=
On Sun, 9 Dec 2001, David Jacobs wrote:
> +for (i = 1; size > i; i <<= 1);
Infinite loop if size == MAXINT, eh? "So don't do that." Ok.
-sam
This small patch cleans up two things with the allocate aligned memory routine. It
cleans up the for loop eliminating the need for the bit operations inside and making
it a bit clearer what is happening. It also reduces the memory allocated from twice
the rounded up power of two to the rounde