all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Move initialization to compile time
@ 2012-07-15 15:05 Eli Zaretskii
  2012-07-15 16:02 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-07-15 15:05 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

Revision 109096 on the trunk moved some initializations from startup
(in temacs) to compile time.  Example:

  @@ -1481,7 +1476,7 @@
   /* Index in interval_block above of the next unused interval
      structure.  */

  -static int interval_block_index;
  +static int interval_block_index = INTERVAL_BLOCK_SIZE;

   /* Number of free and live intervals.  */

  @@ -1491,18 +1486,6 @@

   static INTERVAL interval_free_list;

  -
  -/* Initialize interval allocation.  */
  -
  -static void
  -init_intervals (void)
  -{
  -  interval_block = NULL;
  -  interval_block_index = INTERVAL_BLOCK_SIZE;
  -  interval_free_list = 0;
  -}
  -
  -
   /* Return a new interval.  */

AFAIK, this moves interval_block_index from the .bss section to .data
section.  If I'm right, then perhaps such changes should be discussed
before they are committed.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Move initialization to compile time
  2012-07-15 15:05 Move initialization to compile time Eli Zaretskii
@ 2012-07-15 16:02 ` Andreas Schwab
  2012-07-15 16:11   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2012-07-15 16:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Dmitry Antipov, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> AFAIK, this moves interval_block_index from the .bss section to .data
> section.

Why is that a problem?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Move initialization to compile time
  2012-07-15 16:02 ` Andreas Schwab
@ 2012-07-15 16:11   ` Eli Zaretskii
  2012-07-15 16:48     ` Paul Eggert
  2012-07-15 16:51     ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2012-07-15 16:11 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: dmantipov, emacs-devel

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Dmitry Antipov <dmantipov@yandex.ru>,  emacs-devel@gnu.org
> Date: Sun, 15 Jul 2012 18:02:54 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > AFAIK, this moves interval_block_index from the .bss section to .data
> > section.
> 
> Why is that a problem?

I didn't say it was.  But since (AFAIK) one of them is shared, while
the other isn't, and since some ports CANNOT_DUMP, I thought perhaps
such changes need to be carefully considered first.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Move initialization to compile time
  2012-07-15 16:11   ` Eli Zaretskii
@ 2012-07-15 16:48     ` Paul Eggert
  2012-07-15 16:51     ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Eggert @ 2012-07-15 16:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dmantipov, Andreas Schwab, emacs-devel

On 07/15/2012 09:11 AM, Eli Zaretskii wrote:
> But since (AFAIK) one of them is shared, while
> the other isn't, and since some ports CANNOT_DUMP

Sorry, I don't follow.  Aren't .bss and .data both in
the same category, as far as sharing goes?

In the old days we had to be careful with static
vars because they were read-only in a dumped emacs.
But even then, I don't recall any difference between
.bss and .data -- both were read-only.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Move initialization to compile time
  2012-07-15 16:11   ` Eli Zaretskii
  2012-07-15 16:48     ` Paul Eggert
@ 2012-07-15 16:51     ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2012-07-15 16:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dmantipov, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Cc: Dmitry Antipov <dmantipov@yandex.ru>,  emacs-devel@gnu.org
>> Date: Sun, 15 Jul 2012 18:02:54 +0200
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > AFAIK, this moves interval_block_index from the .bss section to .data
>> > section.
>> 
>> Why is that a problem?
>
> I didn't say it was.  But since (AFAIK) one of them is shared, while
> the other isn't,

Both .data and .bss are writable, so I don't see how you come to that
conclusion.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-15 16:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-15 15:05 Move initialization to compile time Eli Zaretskii
2012-07-15 16:02 ` Andreas Schwab
2012-07-15 16:11   ` Eli Zaretskii
2012-07-15 16:48     ` Paul Eggert
2012-07-15 16:51     ` Andreas Schwab

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.