all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Akihiro KAYAMA <kayama@tiresia.org>
Cc: 14850@debbugs.gnu.org
Subject: bug#14850: 24.3; GDI Handles leak(Windows)
Date: Sat, 13 Jul 2013 15:55:35 +0300	[thread overview]
Message-ID: <83r4f24o1k.fsf@gnu.org> (raw)
In-Reply-To: <CA+wFm7Rw-fKgk0vxZuF=x+Ppsn_5ccJMJt40XL1BY0VWfYQUaQ@mail.gmail.com>

> Date: Fri, 12 Jul 2013 18:49:48 +0900
> From: Akihiro KAYAMA <kayama@tiresia.org>
> 
> When using multiple emacs frames and shell buffer in Windows,
> Emacs process's GDI Handles increase constantly.
> 
> How to reproduce:
> 
>  - emacs.exe -Q
>  - M-x make-frame-command
>  - M-x shell
>  - ping 127.0.0.1 -t (continuous shell output)
>  - M-x find-file (open some mini buffer)
>  - inspect Emacs process's GDI Handles by Process Explorer(
> www.sysinternals.com)
> 
> As the increasing ratio is in proportion to number of frames, with a
> dozen frames Emacs process can easily reach Windows OS limit(=10000 handles)
> in a few minutes.

I don't think the number of frames is such an important factor here.
E.g., try evaluating this in "emacs -Q":

  (dotimes (i 30) (make-frame))

and compare the number of GDI objects before and after.  On my
machine, the difference is much smaller than 30, it's more like 10.

Anyway, I looked through the sources for the Windows API calls that
are documented to produce GDI objects.  All of them seem to have the
appropriate calls to DeleteObject or similar APIs that release these
resources.  So it doesn't seem like we are too sloppy about this, at
least not enough for me to find that.  Not that I know too much about
this issue.

Patches are welcome to make our usage of GDI objects smaller.
Pointers to places where we fail to release GDI objects are also
welcome.





  reply	other threads:[~2013-07-13 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12  9:49 bug#14850: 24.3; GDI Handles leak(Windows) Akihiro KAYAMA
2013-07-13 12:55 ` Eli Zaretskii [this message]
2013-07-13 14:22   ` Eli Zaretskii
2013-07-14  9:55     ` Akihiro KAYAMA
2013-07-14 16:06       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r4f24o1k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=14850@debbugs.gnu.org \
    --cc=kayama@tiresia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.