> I haven't run into such a problem (and my code would blow up as well in
that
> case).

In fact, on the emulator it should not matter and I never checked it. But
this time I designed the method so that it internally branches to
M68K/Arm/X86 and I wanted to explicitly detect argument alignment errors.

>
> Just an idea -- did you hook up a leak tracking system?  (e.g. macro that
> redirects MemPtrNew to something else that allocates a little extra space
at
> the beginning of the chunk for a debug header, such as next/prev pointers
> for a linked list, then returns the actual pointer + the header size).
> Maybe the header size is not a multiple of 4?

Nice idea, but I did not make anything special. The disassembly should prove
it:

  reader= (FileReader   *)MemPtrNew( sizeof(FileReader   ) ) ;
    pea       0x00000010
    trap      #15
    sysTrapMemPtrNew
    move.l    a0,d3

(FileReader is a structure composed of 4 pointers)

    Jan Slodicka



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to