[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mxalloc()



> I have a problem with Mxalloc() here, it looks like it allocates 2
> megs when I asks for 256 bytes...
> 
> 	AVtext = (char*) Mxalloc(256, 0x0003|0x0028);
> 
> I'm trying to allocate 256 bytes (buffer for AV commandlines) as
> global memory under MiNT, have I completely misunderstood Mxalloc()?
> According to the Atari Compendium (HTML-version) and the example in
> the BubbleGEM hypertext it *should* be correct.
> 
> 'AVtext = (char*) Malloc(256);' works without problems.

Have you checked, what the compiled code looks like? I.e. what 
the compiler does from this "256"? :)

And what compiler, btw.?

Konrad M.Kokoszkiewicz

mail:draco@nidus.mi.com.pl
     draco@irc.pl
     draco@piwo.bl.pg.gda.pl
     conradus@avanti.orient.uw.edu.pl
     conradus@plearn.edu.pl
     draco@nuova.id.uw.edu.pl
http://www.orient.uw.edu.pl/~conradus/
 IRC:[Draco]

*** Ea natura multitudinis est,
*** aut servit humiliter, aut superbe dominatur.
*************************************************
*** U pospolstwa normalne jest, ze albo sluzy ono
*** unizenie, albo bezczelnie sie panoszy.
                                           (Liv. XXIV, 25)