|
From: | Dmitry Antipov |
Subject: | Re: GC and stack marking |
Date: | Wed, 21 May 2014 19:57:42 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/21/2014 07:39 PM, Eli Zaretskii wrote:
Now, I have a question: mark_stack stops examining the stack when it gets to its own stack frame. That is certainly safe, but it sounds too conservative: it should stop at the stack frame of Fgarbage_collect, I think, because no live Lisp object can appear while Fgarbage_collect runs, right?
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. Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |