[Konsole-devel] [Bug 61376] New: memory leak when using xterm control codes to write to titlebar
W.B.Maguire II
maguire at AnalyticInvestments.com
Thu Jul 17 22:25:45 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=61376
Summary: memory leak when using xterm control codes to write to
titlebar
Product: konsole
Version: unspecified
Platform: RedHat RPMs
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: konsole-devel at kde.org
ReportedBy: maguire at AnalyticInvestments.com
Version: Konsole 1.2 (KDE 3.1-11 Red Hat) (using KDE KDE 3.1)
Installed from: RedHat RPMs
OS: Linux
I used a Perl program from "Linux Server Hacks" to display the LoadAvg in my Konsole titlebar; result: a memory leak! I verified that the control codes used to print to an XTERM titlebar are correct, and I verified that Konsole *should* accept these XTERM codes, and I wrote a small demonstration CSH script (below).
I'm wondering if this problem has not been noticed before, because---most commonly---a path (or something) is written to a titlebar upon a directory change. It would take quite a few directory changes to notice the memory leak! But, if you want to display the Load Average (or time) in the titlebar---and have it update every second or two---then the leak definitely becomes noticeable.
I observed this memory leak over a *long* period of time before I figured-out the root cause. in fact, I even upgraded from RH8.0 to RH9, since the memory leak showed-up under the "kdeinit: kicker" process, I figured it was a Kicker bug.
-------------------------------------------
#!/bin/csh
# When I run this program on my system, I see the memory of the
# "kicker" process jump up by 4kB every 17-19 seconds! I'm using the
# "pmap" program to monitor the "kicker" memory increase.
while (1)
# The following is the REAL stuff I *wanted* in my titlebar:
#
#set loadavg = `cat /proc/loadavg | awk '{print $1," ",$2," ",$3}'`
#set datetime = `date`
#echo -n " ]2;$tty $loadavg $datetime"
#
# This is merely to demonstrate the memory leak that exists when
# using XTERM control-character codes to print to the titlebar.
# The memory leak shows-up in *kicker*! The process has the name
# "kdeinit: kicker" on my machine.
#
# ]0 => write to titlebar text and icon text
# ]1 => write to icon text
# ]2 => write to titlebar text
#
# Write 40 characters (not counting control characters)...
#
echo -n " ]2;1234567890123456789012345678901234567890"
#
# ...every second:
#
sleep 1
end
More information about the konsole-devel
mailing list