AllocMem(sizeof(struct Mystruct), 0);
would
AllocVecTags(sizeof(struct Mystruct), TAG_END) do ?
Code: Select all
struct dos_info
{
char *cb; /* copy buffer */
LONG cbsize; /* size of copy buffer */
BPTR rootlk;
BPTR destlk;
char rt[25600]; /* root name, exagerrated length */
char dest[25600]; /* destination name, exagerrated length*/
int newpath, rootend, destend;
LONG size;
LONG protflag;
};
int main(void) ///char *dirname)
{
struct dos_info *ds;
if((ds=AllocVecTags(sizeof(struct dos_info),TAG_END)))
Printf("size %d\n", sizeof(struct dos_info)); /// size 0
FreeVec (ds);
if((ds=AllocVecTags(sizeof(struct dos_info), AVT_Type, MEMF_SHARED, TAG_END)))
Printf("size %d\n", sizeof(struct dos_info)); /// size 0
FreeVec (ds);
}
Is omething wrong with my test ?