huge memory leak

macOS specific usage questions
zdahAli
New Cone
New Cone
Posts: 7
Joined: 11 Sep 2009 17:56

huge memory leak

Postby zdahAli » 27 Sep 2010 17:36

I am using vlc 1.1.3 on snow leopard. I just had a huge memory leak while playing mp3 ( more than 4 Go of virtual memory), and the amount was growing till my hard drive was full. I don't think this is normal ...

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: huge memory leak

Postby Jean-Baptiste Kempf » 28 Sep 2010 00:20

Local files?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

zdahAli
New Cone
New Cone
Posts: 7
Joined: 11 Sep 2009 17:56

Re: huge memory leak

Postby zdahAli » 28 Sep 2010 12:24

yes

fkuehne
Developer
Developer
Posts: 7188
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: huge memory leak

Postby fkuehne » 05 Oct 2010 00:32

Does resetting VLC's preferences have any effect? (To do so delete both a folder called "VLC" and a file named "org.videolan.vlc.plist" in ~/Library/Preferences.)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

VlcAwesome
New Cone
New Cone
Posts: 1
Joined: 28 Oct 2010 20:14

Re: huge memory leak

Postby VlcAwesome » 28 Oct 2010 20:33

I too have this problem of a huge "Inactive" memory leak not being released during playback nor upon quitting VLC.
I am running 1.1.3 on Snow Leopard 10.6.4 on a mostly stock core i5 iMac from 2010 (has Xcode + macports ghostscript + avidemux + handbrake).
I tried the dev suggestion of deleting VLC preferences. This had no effect.

To be clear, whenever I play (not pause) an x264 video inside an mkv container or an XviD inside an avi, my Inactive and Used Memory
as displayed in Activity Monitor slowly increase until my system runs completely out of Free Memory, and I end up swapping after watching
a film or two. Active Memory remains constant, and so does Wired. When I pause or stop the video, the memory stops being used up.

Any ideas? I really appreciate all your work on this software. It's really awesome.

EDIT: After reading thru some apple docs on memory, like this one:
http://developer.apple.com/library/mac/ ... emory.html
I found that memory mapping will eat up inactive memory, and that the system should use the inactive memory when it needs it
rather than swapping. Well mine just uses all 8 GB of ram. This seemed like an Apple problem the more I read.

But this made me think about VLC's memory map option. What if I disabled the express usage of memory mapping?
So I turned off my Input Codecs -> Access Modules -> MMap -> Use file memory mapping, and now my system uses
Active memory during playback not Inactive memory. The Active memory gets released upon quitting VLC as I figured
it should.

So I guess I don't have a problem per se. It might even be normal behavior.

Entropy
New Cone
New Cone
Posts: 7
Joined: 02 Nov 2010 00:02

Re: huge memory leak

Postby Entropy » 05 Nov 2010 07:08

You're right. VLC chews through free memory VERY quickly. After I'm done watching a movie my system is almost unusable. The developers need to code VLC so doesn't it doesn't make OS X catch all of the data... Quicktime does not have this problem.

roger jonsson
Blank Cone
Blank Cone
Posts: 68
Joined: 23 Apr 2007 19:21

Re: huge memory leak

Postby roger jonsson » 18 Nov 2010 13:18

But this made me think about VLC's memory map option. What if I disabled the express usage of memory mapping?
So I turned off my Input Codecs -> Access Modules -> MMap -> Use file memory mapping, and now my system uses
Active memory during playback not Inactive memory. The Active memory gets released upon quitting VLC as I figured
it should.

So I guess I don't have a problem per se. It might even be normal behavior.
THANK YOU! WHAT A RELEIF! :D
Even better, I just played a dvd and it didn't even chew away the free memory as it played.

The "memory map" function should come disabled and with a big warning when trying to turn it on. -It is now turned off and it will stay turned off!!!

Entropy
New Cone
New Cone
Posts: 7
Joined: 02 Nov 2010 00:02

Re: huge memory leak

Postby Entropy » 22 Nov 2010 08:58

But this made me think about VLC's memory map option. What if I disabled the express usage of memory mapping?
So I turned off my Input Codecs -> Access Modules -> MMap -> Use file memory mapping, and now my system uses
Active memory during playback not Inactive memory. The Active memory gets released upon quitting VLC as I figured
it should.

So I guess I don't have a problem per se. It might even be normal behavior.
THANK YOU! WHAT A RELEIF! :D
Even better, I just played a dvd and it didn't even chew away the free memory as it played.

The "memory map" function should come disabled and with a big warning when trying to turn it on. -It is now turned off and it will stay turned off!!!
That's exactly how I felt when I found out about the "memory map" option. And thank goodness I did!!! My system would literally be crawling when I was finished with a movie, now all is normal. THIS SHOULD BE DISABLED BY DEFAULT!!!

Rémi Denis-Courmont
Developer
Developer
Posts: 15142
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: huge memory leak

Postby Rémi Denis-Courmont » 27 Nov 2010 18:24

The memory map option is disabled by default, and it has been that way in every VLC releases to include it. Except the MacOS developers decided to enable it on MacOS.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

stevenmusicmaker
New Cone
New Cone
Posts: 5
Joined: 05 Feb 2011 07:17

Re: huge memory leak

Postby stevenmusicmaker » 14 Feb 2011 00:37

Hey guys in VideoLAN,
I stumbled across this posting and think it may answer why I run out of free memory and quitting the suspect program does not change anything. I recently downloaded both VLC and jDownloader, since in a way they are complementary programs, that is, you need to have movies downloaded so you can watch them on VLC. I am a novice when it comes to really understanding computer speak, so things go over my head very easily! I thought the constant downloading (all night) was what was filling up my inactive memory (the blue color) and that was why my free memory (the light green color) was almost gone. While downloading, I was also watching (sort of) VLC movies and now I am realizing it was the VLC memory mapping that was set to ON, by de-fault, that was using up available Free memory, somehow. Because I was doing these extended downloads, I did not want to re-start my machine to somehow re-capture free memory. While I thought it was jDownloader eating up my memory, it was actually VLC, from what I read above.

I have a Macbook Pro running MacOSX 10.6.6, VLC 1.1.7. Just to re-cap, because of what was previously stated by VlcAwesome, I went to the overhead menu bar and clicked on VLC and opened Preferences. Then when they opened I clicked on Input & Codecs, found at the top of the Preference window. Next I went to the bottom left of Input & Codecs and clicked on All, instead of Basic, which opened another window. At the top left of this window was MMap, inside the scrolling window under MMap was Input/Codecs, I scrolled downed beneath Access modules and found MMap (again), which I clicked on, which gave me access near the top to allow me to Uncheck the box next to, Use file memory mapping.

Now, guys that know Mac compu-speak, have I corrected VLC so it will not eat up memory incorrectly? As soon as I finish writing this, I will turn my machine off and on, because though I did the above, quitting VLC did not release the blue inactive memory, which I think restart will. If I understand properly, by changing the settings as outlined, VLC will no longer eat inactive memory, and what memory it does use will be released when exiting the program.

Now look, I wrote this out in 'long-hand' for people, like myself, that would like someone to hold their hand as they go through the process to make sure they have done things properly. If I missed something, please tell me!

Thank you, glad for this forum and the people on it! The guys over head have really been a great help!

ajmas
Big Cone-huna
Big Cone-huna
Posts: 935
Joined: 04 Feb 2006 07:33
VLC version: 3.0.x
Operating System: MacOS X
Location: Montreal, Canada

Re: huge memory leak

Postby ajmas » 17 Feb 2011 19:31

It is possible that this could was activated for performance reasons.

A quick search on the issue reveals this thread on Omnigroup's macosx-dev mailing-list, with the solution being outlined here: http://www.omnigroup.com/mailman/archiv ... 46790.html

If someone is in a position to modify the code to support this and see if it changes anything, then that would cool.
Providing logs, messages, configuration info (VLC, OS, Hardware) and a clear explanation of the issue always helps the problem solvers help you, even if they don't end up solving the issue. Just think what you would need if you were solving someone else's problem. Additional: Always looking for eager and capable MacOS X developers to join the VLC team - for more information see here.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 3 guests