[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pure space and overflow question
From: |
Andrea Corallo |
Subject: |
Re: Pure space and overflow question |
Date: |
Fri, 21 Feb 2020 15:23:03 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Andrea Corallo <address@hidden>
>> Cc: address@hidden
>> Date: Fri, 21 Feb 2020 13:54:42 +0000
>>
>> > That said, why does your configuration require more pure space than
>> > any other on that same platform?
>>
>> Effectively in comp.c are allocate object that goes into pure space and
>> all the code is under #ifdef HAVE_NATIVE_COMP.
>>
>> Also the constant objects present in every compilation unit can have a
>> small overhead respect to the elc one. This is because they include the
>> data used by the 'top_level_run' function.
>
> Do you really need the former to be pure, and to be dumped in general?
> If so, why?
>
> I think with portable dumper in place, we should have a more
> fine-grained distinction between the stuff that really needs to be
> dumped, and stuff that just happens to be there due to code that runs
> at loadup time. The latter should not be dumped, but instead should
> be re-created anew in every Emacs session. In particular, stuff that
> is needed for compilation should ideally not even be in memory until
> the user wants to compile something.
>
> Am I missing something?
No you are not, effectively immediate objects into 'top_level_run' don't
have to stay necessarily into pure space because once the file is loaded
and emacs is dumped 'top_level_run' has no reason to be execute ever
again. In this sense is a very special function.
I've added a special variable to impose that objects are emitted as
'impure' (never copied to pure space). Binding this to t while emitting
the code for 'top_level_run' does the job.
This is sufficient to stay in the current pure space size (at least for
my current X configuration). I'll be pushing it when finished with
the tests.
Thanks
Andrea
--
address@hidden