Hi Alex,

On May 21, 2013, at 7:02 AM, Alexander Burger <a...@software-lab.de> wrote:

> On Tue, May 21, 2013 at 05:56:52AM +0200, Rand Dow wrote:
>> Each co-routine should have it's own separate stack. Best practices with
>> stack management today have a sufficiently large stack that grows and then
>> terminates in unmapped memory. If it is attempted to grow the stack too
> 
> OK. That's exactly how I implemented it.

Good!
..

>> And certainly operating system events could overwrite things deeper on the
>> stack during a context switch.
> 
> As I said, these would use the system stack. And even if they would use
> the user stack, there should be sufficient space. As I said, we have 1
> MB per stack frame, and this can be easily extended with the 'stack'
> function.

The hardware (CPU) will write at least two words (instruction pointer and CPU 
status register, and maybe more) onto the user stack before switching to the 
system stack.

> Again, my problem is not to have a stack frame for each task, but having
> stack frames BELOW the active stack pointer.

I'm not sure about this in the general case. I would feel uncomfortable about 
it.


I'm stilled amazed at PicoLisp! I wish I could use it again in my work!

Rand--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to