|
From: | Dmitry Antipov |
Subject: | Re: GC and stack marking |
Date: | Wed, 21 May 2014 20:06:55 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/21/2014 07:57 PM, Dmitry Antipov wrote:
1) Yes, but you need ABI- and machine-specific tricks to find the stack frame boundaries. I.e. while in mark_stack, there is no easy way to find start and end of Fgarbage_collect's stack frame. 2) But see GCC's __builtin_frame_address, https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html. 3) But even if 2) works on all platforms we have to support, I don't see a reasons to complicate GC just to avoid scanning a few tens of bytes of an extra stack frame.
4) mark_stack calls __builtin_unwind_init to save registers onto the stack. So if you stop at Fgarbage_collect's stack frame, you don't scan the frame of mark_stack too and may loose Lisp_Objects accessible from registers. Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |