Subject: Re: bug#17975: 24.3.92; assertion failure deleting frames with varying names for the same display (and, using multiple X11 connections in that case too)

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Sep 2020 16:01:58 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Fri, 11 Sep 2020 14:54:25 +0200
> Cc: Ken Raeburn <[email-masked]>, [email-masked]
> 
> > But, to whom it may be interesting, running the following code:
> >  (dotimes (n 10000)
> >   (let ((x (make-frame-on-display ":1.0"))
> >         (y (make-frame-on-display ":1.0")))
> >     (delete-frame x)
> >     (delete-frame y)))
> >
> > with Xnest (which is ":1.0") successfully raises Emacs' RSS from
> > ~30M to ~120M.
> 
> This sounds like it should be reported as a new bug report.

Probably.  But since AFAIK glibc doesn't return memory to the system,
it could be a simple consequence of the glibc memory management.  The
question is how much of those 120M - 30M is marked free for further
allocations by Emacs.