After a heavy browsing session (lots of tabs, etc) Firefox takes up a large amount of memory: total used free shared buffers cached Mem: 906392 688544 217848 0 65312 440240 -/+ buffers/cache: 182992 723400 Swap: 546204 0 546204 This is similar to version 0.8 which I previously used. However, with version 0.8, the used memory was freed when I closed Firefox. This does not seem to happen with 1.0. After I close it I get this: total used free shared buffers cached Mem: 906392 619736 286656 0 65316 442972 -/+ buffers/cache: 111448 794944 Swap: 546204 0 546204 Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 i686) ================================================================= System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Nov 5 2004, 15:16:07)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://ftp.roedu.net/pub/mirrors/gentoo.org http://gentoo.oregonstate.edu" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync1.ro.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X aalib alsa apache apm avi bitmap-fonts cdr crypt cups curl encode f77 faac faad fam flac font-server foomaticdb fortran gd geoip gif gphoto2 gpm gtk2 guile imagemagick imlib imlib2 jikes jpeg lcms libcaca libwww lzo mad matroska mikmod mmx mmx2 mng motif mpeg mysql ncurses network nls no_wxgtk1 oggvorbis opengl pam png python quicktime readline rtc ruby sdl slang spell sse ssl tcpd tga theora tiff truetype truetype-fonts type1-fonts xchatdccserver xml2 xmms xprint xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS cloud cups # equery uses mozilla-firefox [ Searching for packages matching mozilla-firefox... ] [ Colour Code : set unset ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for net-www/mozilla-firefox-1.0 ] U I - + java : Adds support for Java + + gtk2 : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both. - - ipv6 : Adds support for IP version 6 - - moznoxft : Disable XFT support in mozilla (also firefox, thunderbird) + + truetype : Adds support for FreeType and/or FreeType2 fonts - - xinerama : Add support for the xinerama X11 extension, which allows you to stretch your display across multiple monitors - - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too - + java : Adds support for Java - - gnome : Adds GNOME support + + gtk2 : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both. - - ldap : Adds LDAP support (Lightweight Directory Access Protocol) - - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too - - xinerama : Add support for the xinerama X11 extension, which allows you to stretch your display across multiple monitors + - xprint : Support for xprint, http://www.mozilla.org/projects/xprint/ - - moznoxft : Disable XFT support in mozilla (also firefox, thunderbird) - - mozdevelop : Enable features for web developers (e.g. Venkman) - - mozxmlterm : Enable mozilla's XML-based command-line terminal NOTE: equery seems to have some bugs.. that's why it displays some use flags twice!
prior, used = 688544 after, used = 619736 Where is the bug? memory was released...
> Where is the bug? memory was released... This is my mistake... I forgot to mention that, prior to starting Firefox, used memory was somewhere in the range of 150MB
This bug is another funny mistake... you almost got me scared, but allow me to explain. The "total used memory" you are looking for is the 182 992 bytes before closing Firefox, and 111 448 bytes after closing Firefox. You can get to your total memory by looking at the "after" situation, and summing it up as Total = used (619 736) + free (286 656) - or - Total = in use by programs (111 448) + used as cache (442 972) + used as buffers (65 316) + free, used for nothing (286 656) - or - Total = in use by programs (111 448) + free for use by programs (794 944)
Kimmo, I'm sorry, I don't quite understand what you're trying to say. Also, maybe I wasn't very clear in my first post, so let me try to explain the situation again: 1) Boot up and enter X Used memory: aprox 150 MB (I don't remember exactly) Free memory: 906392 KB - 150 MB 2) Start Firefox. Heavy browsing (lots of tabs, etc.) Used memory: 688544 KB Free memory: 217848 KB 3) Close Firefox Used memory: 619736 KB Free memory: 286656 KB As you can see, after closing, Firefox frees only 68806 KB of memory (688544 - 619736) which is very close to 286656 - 217848, so I'm assuming that this memory is then available as free memory. What happened to the rest of the free memory from the beginning (906392 KB - 150 MB) ? Maybe the description of the bug isn't very good... It should have been "firefox 1.0 doesn't release memory when closed" or something like that. However, to my knowledge, that's a memory leak. Also, I remember very well how Firefox 0.8 used to behave. After being closed it used to free up all the memory it used, so that free would report a lot less memory under "used" and a lot more under "free".
http://gemal.dk/blog/2005/02/23/memory_issue_on_tabs_now_fixed/ quote: One problem that many people have been seeing is this. Opening lots of tabs and then closing them do not free memory. This should now have been fixed by checkins yesterday and today. This fixes some memory leaks in Mozilla Firefox. For more information please turn to the bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=131456
This is fixed in upstream aka 1.5 firefox, close this bug.
Bug has been resolved since 1.0.6. Open a new bug if problem still persist with anything new then 1.0.7 as it is stable in tree.