Thin Lock Implementation

Walter Bright newshound1 at digitalmars.com
Tue Aug 19 20:02:10 PDT 2008


Walter Bright wrote:
> BCS wrote:
>>> The memory isn't committed until it is used, but the address space is.
>>> You cannot move the stack if it exceeds its preallocated address space
>>> allotment.
>> Must the stack be contiguous? Could you, on a stack overflow, heap 
>> allocate a new chunk and put in a frame that gets back to the last 
>> segment?
> 
> No.

I suppose I should explain a bit more. Stack overflows are detected by 
the hardware, which means every PUSH could overflow the stack. It isn't 
practical to then try and continue the stack elsewhere, because the 
corresponding POPs would not know what was going on.



More information about the Digitalmars-d mailing list