Re: AW: [cc65] Best way to get aligned memory...

Date view Thread view Subject view

From: Piotr Fusik (P.Fusik_at_elka.pw.edu.pl)
Date: 2003-01-07 10:25:20


On Tue, 7 Jan 2003, [iso-8859-1] Christian Krüger wrote:

> ..but what about the memory usage? Is there only memory
> reserved if the '_buffer'-symbol is 'in use' or will the
> buffer allways allocated by the linker if the 'buffer.s'
> is in my runtime-lib?
>
If you put buffer.o into a library and link your program with
this library, then buffer.o module will be linked only if you use any
symbol from it.

BTW. here's another solution:
char buffer[size + patchbytes];
#define realbuffer  ((char*) ((int) (buffer + patchbytes) & ~patchbytes))

Piotr

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-07 10:25:34 CET