Re: [AD] Memory handling problems in 4.3.10

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wednesday 24 September 2008, Colin Ward wrote:
> On 24/09/2008, you wrote:
>
>
> [snip]
>
> >> > Until now I have hacked the code
> >> > in src but as I am preparing to submit my port to the Allegro svn I
> >> >  need to ix them properly.  I propose a _AL_STRDUP macro that gets
> >> >  defined along ith _AL_MALLOC and _AL_FREE.  Any comments?
> >>
> >> Sounds fine to me.
> >
> > Seems not even our own ustrdup uses _AL_MALLOC - that also needs to be
> > fixed.
>
> ustrdup() isn't so bad, because it's a macro around _ustrdup() and
> _ustrdup() is passed a pointer to an allocator.  So in your platform
> specific header file you can #undef ustrdup() and then redefine it to pass
> in your own allocator.  But...
>
> 1) Passing in an allocator seems rather heavy handed to me - is there a
> reason for this?
>
> 2) Having to #undef ustrdup isn't very nice either.

Windows doesn't like it when you mix allocators across dlls. IIRC.

> --
> /-------------------------------------------------------------------\
> [Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
> [VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
> [600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
> [Assembly Language: The most fun you can have with your clothes on! ]
> \-------------------------------------------------------------------/
>


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/