Amiga-C (97/223)

From:Sensei
Date:12 Aug 2001 at 23:57:44
Subject:[amiga-c] Re: How do I copy clone

Czesc Jack!

Dnia 11-Aug-01, Jack York napisa�:

> It was failing with the fib I had allocated with AllocPooled also. Which
> way does AllocPooled align?

printf( "%ld\n", (ULONG) memory & 0x7 ); for couple and you'll know... If 0 it
aligns to at least 8 bytes, if 0 and 4 it aligns to 4 bytes.

> In a different post I mentioned that I was
> told that AllocPooled called AllocMem and AllocMem says it returns LONGWORD
> aligned memory.

AllocPooled() uses AllocMem() ONLY for big chunks of memory! It's allocating
small chunks of memory from big one, and I might use different alignment than
AllocMem() of course...

> So if I use AllocPooled to obtain memory for a fib, is that
> incorrect?

It's not really correct. Because usually nobody is allocating memory pools
with MEMF_PUBLIC flag set thought.

> I am not opposed to using AllocDosObject but I would like to
> know why I am doing it.

Because f.e. AllocDosObject() is recommended function to doing this job. It's
not enough? ;)

Regards!



Can your ImageFX paint like bitmap painters?
Download: gfx/ifx/REDFiX.lha, ftp.novadesign.com

Przemyslaw 'SENSEI' Gruchala

code/gfx2d/gfx3d/webmaster

Amiga 1200
Apollo 1240/33 MHz, 18 MB RAM, BTC 33.6 bps
HDD 3.2 GB, HDD 520 MB, CD x12



Chcialbys zarobic lub "dorobic" naprawde dobre pieniadze?
Otrzymasz do 300zl za kazda firme ktora wprowadzisz do Centrum e-biznesu
Poszukaj wsrod znajomych, znajdz firme i wypelnij z nia prosty formularz
Aby rozpoczac wejdz do http://praca.getin.pl i zostan Partnerem Getin

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/