Discussion:
Heap
(too old to reply)
Neven N Klacar
2004-07-16 05:55:14 UTC
Permalink
Can we use the heap for the array space instead of the stack.

If so what register points to the heap?

If there is no register what is the starting adress of the heap?
James Schofield
2004-07-16 12:43:46 UTC
Permalink
Post by Neven N Klacar
Can we use the heap for the array space instead of the stack.
If so what register points to the heap?
If there is no register what is the starting adress of the heap?
There is no register pointing to the heap. You would have to add a label
to the end of your code, and then use the address of that label as the heap.

main:
...MIPS code...
heap:


James
Troy Mark Gonsalves
2004-07-20 18:01:44 UTC
Permalink
Post by James Schofield
You would have to add a label
to the end of your code, and then use the address of that label as the heap.
Now that we're covered loaders (and linkers) I hope you see that problem
with this approach.

Troy Mark Gonsalves
2004-07-20 17:59:20 UTC
Permalink
Post by Neven N Klacar
Can we use the heap for the array space instead of the stack.
No.
Post by Neven N Klacar
If so what register points to the heap?
None of them.
Post by Neven N Klacar
If there is no register what is the starting adress of the heap?
Just after all the code in memory...but you don't really know where that
is.
Continue reading on narkive:
Loading...