A83: Re: Re: Re: Re: Re: _insertmem & _deletemem [83]


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

A83: Re: Re: Re: Re: Re: _insertmem & _deletemem [83]




Yeah yeah, okay...
You should check memory beforehand, because insertmem does not check.  It
does check to make sure the pointer to insertion address (which would be DE)
is in a valid place (sortof, it makes sure it's below the fpstack), but
doesn't do any checking on the number of bytes to insert.  If you insert too
many, you'll get a crash.  It doesn't update the any size bytes of the
variable either, you'll have to do that manually.

-Dan Englender

----- Original Message -----
From: "Henk Poley" <HPoley@DDS.nl>
To: <assembly-83@lists.ticalc.org>
Sent: Tuesday, October 31, 2000 1:17 PM
Subject: A83: Re: Re: Re: Re: _insertmem & _deletemem [83]


>
> Q: How do you know that the memory is really allocated by _insertmem???
> A: The best idea would be to check beforehand to make sure there was
>     enough free RAM.  You may get an ERR:Memory if you try to allocate
>     more than's available, or it may crash, I'm not sure which :)
> Dan Englender
> Okay I'll tell that in my ROMcall reference...
> But if somebody knows some better explanation, Thanks
>




References: