<div>Hi,<br></div><div><br></div><div>On some linux systems, Ubuntu especially, with an attached display has quite the impressive memory leak.<br></div><div><br></div><p style="box-sizing: border-box; margin-bottom: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; margin-top: 0px !important;" dir="auto"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(36, 41, 47)"><span class="font" style="font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji""><span class="size" style="font-size:14px">Sometime this spring between change 20981 and change 21617 there were changes made to the screen resolution code that changed how often, it seems, we call display_ioScreenScaleFactor. Before it must have been rarely called like on startup and resize or whatever and now it is called often, sometimes many times per second.</span></span></span></span><br></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" dir="auto"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(36, 41, 47)"><span class="font" style="font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji""><span class="size" style="font-size:14px">The X11 code, being X11 code for Linux, has multiple ways of doing something and this holds true for the code to get the screen scale factor. Which path was followed depended on some things but on assorted Ubuntu systems the path followed called scale_Xftdpi_usable. This called XrmGetStringDatabase every time it entered but if Xft.dpi was there then it returned without calling XrmDestroyDatabase. Ergo the memory leaked.  I don't think much memory leaked per call, but, it is called often.</span></span></span></span><br></p><p style="box-sizing: border-box; margin-top: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; margin-bottom: 0px !important;" dir="auto"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(36, 41, 47)"><span class="font" style="font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji""><span class="size" style="font-size:14px">The patch is in the OpenSmalltalk/opensmalltalk-vm issue 642.  It's one line.</span></span></span></span><br></p><div dir="auto"><br></div><div dir="auto"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(36, 41, 47)"><span class="font" style="font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji""><span class="size" style="font-size:14px">I had thought this was an image side issue and therefore would not need touching for the release, but, this kind of eats memory for users who user Squeak interactively on some Linux systems, most notably Ubuntu systems including 18.04 and 22.04.  </span></span></span></span><br></div><div dir="auto"><br></div><div dir="auto">cheers<br></div><div dir="auto"><br></div><div dir="auto">bruce</div><div ><br></div>