unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6006: recent emacs binary size increase by 800KB
@ 2010-04-22 17:13 Dan Nicolaescu
  2010-04-22 19:35 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Nicolaescu @ 2010-04-22 17:13 UTC (permalink / raw)
  To: 6006

Looking at recent emacs builds:

$ ls -l emacs-24*
-rwx------ 1 dann dann 7541146 Apr 15 16:04 emacs-24.0.50.1*
-rwx------ 1 dann dann 7545209 Apr 15 17:49 emacs-24.0.50.2*
-rwx------ 3 dann dann 8405343 Apr 18 15:53 emacs-24.0.50.3*

$ size -f emacs-24*
   text    data     bss     dec     hex filename
1847515 5426628       0 7274143  6efe9f emacs-24.0.50.1
1848083 5430148       0 7278231  6f0e97 emacs-24.0.50.2
1848275 6290116       0 8138391  7c2e97 emacs-24.0.50.3

The "data" segment size has increased between the .2 and .3 version by 800KB.

The change responsible seems to be this:

2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>

            * loadup.el: Setup hash-cons for pure data.









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

* bug#6006: recent emacs binary size increase by 800KB
  2010-04-22 17:13 bug#6006: recent emacs binary size increase by 800KB Dan Nicolaescu
@ 2010-04-22 19:35 ` Stefan Monnier
  2010-04-22 20:45   ` Dan Nicolaescu
  2011-07-13 18:05   ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-04-22 19:35 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 6006

> The "data" segment size has increased between the .2 and .3 version
> by 800KB.
[...]
>             * loadup.el: Setup hash-cons for pure data.

Yes, this patch makes Emacs use free up a fairly large hash-table just
before dumping, so its image is larger, with a fair amount of memory
that's not actually used (it's still allocated to the Emacs process but
Emacs has it registered as "free for reuse").

Some of that memory can be recovered by adjusting the size of the
pure-space (since the patch reduces the pure-space usage but didn't
reduce the redefined size of the pure space), but not all.

This said, I don't think it's a real problem since that memory is not
really wasted (it will be used when Emacs starts to allocate), other
than on the disk.


        Stefan






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

* bug#6006: recent emacs binary size increase by 800KB
  2010-04-22 19:35 ` Stefan Monnier
@ 2010-04-22 20:45   ` Dan Nicolaescu
  2011-07-13 18:05   ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2010-04-22 20:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 6006

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> The "data" segment size has increased between the .2 and .3 version
>> by 800KB.
> [...]
>>             * loadup.el: Setup hash-cons for pure data.
>
> Yes, this patch makes Emacs use free up a fairly large hash-table just
> before dumping, so its image is larger, with a fair amount of memory
> that's not actually used (it's still allocated to the Emacs process but
> Emacs has it registered as "free for reuse").
>
> Some of that memory can be recovered by adjusting the size of the
> pure-space (since the patch reduces the pure-space usage but didn't
> reduce the redefined size of the pure space), but not all.
>
> This said, I don't think it's a real problem since that memory is not
> really wasted (it will be used when Emacs starts to allocate), other
> than on the disk.

Part of that memory will be read from the disk at start up....
What if you allocate the hash table with a bigger size when creating
it? and maybe prefill it too.  That way there's a higher chance that
the memory will be returned to the OS when freed...







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

* bug#6006: recent emacs binary size increase by 800KB
  2010-04-22 19:35 ` Stefan Monnier
  2010-04-22 20:45   ` Dan Nicolaescu
@ 2011-07-13 18:05   ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-13 18:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dan Nicolaescu, 6006

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> This said, I don't think it's a real problem since that memory is not
> really wasted (it will be used when Emacs starts to allocate), other
> than on the disk.

Makes sense, so I'm closing this report.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

end of thread, other threads:[~2011-07-13 18:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 17:13 bug#6006: recent emacs binary size increase by 800KB Dan Nicolaescu
2010-04-22 19:35 ` Stefan Monnier
2010-04-22 20:45   ` Dan Nicolaescu
2011-07-13 18:05   ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).