[A83] Re: allocating uninitialized memory? + _insertmem


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

[A83] Re: allocating uninitialized memory? + _insertmem




> > > >My sloppy way to allocate that much ram is to create a program file
> > > >of the required size and delete this when done.
> > > I'm not sure why this is a 'sloppy' way to allocate memory.  If your
> > > program needs a fixed amount of RAM, I don't see why this shouldn't be
> > > the preferred way of doing it.
> > I think this is a good way to allocate memory... If everything is
> > stored, it's easy to stop the application and start it again where it
> > ended. Useful when programming games...
>
> I think it is a very good way.  The downsides to that are, as before
> mentioned: that the VAT is changed, and programs that index or otherwise
use
> the VAT might need to be reset somehow after every program creation and
> deletion; and that creating and deleting a program takes more clock cycles
> than using something like _insertmem and _deletemem.  I have had no
> experience with the latter rom calls, so I use the program method and it
> works fine for my purposes.
>
> Jeff
>
>
It's still sloppy, though.  You can't absolutely guarantee that another
program won't already exist with the same name - although you could manually
check that, I suppose.




References: