Re: A92: Handle of BSS
[Prev][Next][Index][Thread]
Re: A92: Handle of BSS
At 07:52 PM 4/30/98 +0200, Famille SCHERRER wrote:
>When you use the BSS section, it create a handle, isn't it ?
>But if you use tios Heap functions, has it the potential to
>move the BSS buffer ? it should, isn't it ?
>And then, the program would crash.
Of course. But the same kind of heap manipulation could also move the Fargo
program that is currently executing, which would definately cause a crash.
The moral of the story: wait until Fargo 0.3.0 to do the type of heap
manipulation that might delete or resize a block located below the
currently running program.
It'll be fine as long as you stick to:
1) allocating blocks
2) resizing or deleting *only* the blocks you allocated after the program
was started
3) deleting all blocks allocated by the program before it quits
>I want to know if it is possible to get the BSS section handle
>of a program.
Why would you want to do that? In any case where you'd need to do that, you
should instead allocate your own handle.
Getting the BSS handle is possible, but quite nonstandard -- and will
guarantee incompatibility with future Fargo versions. You see, in future
versions of Fargo the BSS section will *not* be guaranteed to be a block on
the TI-OS's heap.
The same goes for doing something like looking directly into a Fargo
program to get its comment, or to list its linked libraries, which is why I
will add kernel functions to do this.
---
David Ellsworth
davidell@earthling.net
IRC: eXocomp
ICQ: 2300673
References: