PPC serial - fix buffer allocation

Jonathan Larmour jifl@eCosCentric.com
Fri Mar 28 17:38:00 GMT 2003


Gary Thomas wrote:
> On Fri, 2003-03-28 at 09:21, Jonathan Larmour wrote:
> 
>>Gary Thomas wrote:
>>
>>>Index: devs/serial/powerpc/quicc/current/ChangeLog
>>>===================================================================
>>>RCS file: /misc/cvsfiles/ecos/packages/devs/serial/powerpc/quicc/current/ChangeLog,v
>>>retrieving revision 1.16
>>>diff -u -5 -p -r1.16 ChangeLog
>>>--- devs/serial/powerpc/quicc/current/ChangeLog	23 Mar 2003 16:21:40 -0000	1.16
>>>+++ devs/serial/powerpc/quicc/current/ChangeLog	28 Mar 2003 13:14:15 -0000
>>>@@ -1,5 +1,10 @@
>>>+2003-03-28  Gary Thomas  <gary@mlbassoc.com>
>>>+
>>>+	* src/quicc_smc_serial.c: Change how buffers are allocated & aligned
>>>+	to a cache line - previous attempt wasted a huge amount of space.
>>
>>Wouldn't it be (potentially) more efficient still to use an alignment macro?
> 
> 
> It might, but I seem to recall that there are limits on the
> granularity of the alignment (the linker will only go so far
> for non-section objects).

I don't recall that happening, and from a quick test with:

#include <stdio.h>

char one;
char foo[7777] __attribute__((aligned(1024)));

int main()
{
     printf("&one=%p, &foo=%p\n", &one, &foo);
     return 0;
}

it doesn't appear to either.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine



More information about the Ecos-patches mailing list