Hi Dan,


> > #define safemalloc(length) \
> >    (malloc((length) <= 0 ? 1 : (length)) ? : (char
> > *)alloc_failed("malloc",(length)))
> >
> > The main advantage of this is that only one function call for each
> > malloc is required (malloc itself) instead of two (safemalloc+malloc).
> > ?: is supposed to be more efficient than if () but I'm not sure thats
> > really true. If I could only disassemble the code.... Suggestions?
>
> This is for gcc, every compiler I've seen has similar options:
>
>      -S    Stop after the stage of compilation proper; do not as-
>           semble.   The output is an assembler code file for each
>           non-assembler input file specified.
>
>           By default, GCC makes the assembler  file  name  for  a
>           source  file  by replacing the suffix `.c', `.i', etc.,
>           with `.s'.  Use -o to select another name.
>

I wondered about creating the assembler file that way. I wasn't sure if
there was a tool that provided a better output. My past experience showed
compiler generated assembler was less easy to read than that of dedicated
disassemblers but I will gibe it a go and take a peek.


> Maybe you want to quantify some of the memory impacts.

I specifically didn't try to get too detailed on this because everyones
configuration is different, with different modules loaded, configured etc,
so I decided to see if there was any value pursuing this before I spent too
much time doing it! There certainly seems to be some things that I can look
at.


> Please, don't send us HTML.

Oops - sorry. I realised I'd goofed just after it went. I won't do it again!

Dave

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to