Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    How do you stop Memory Leaks?

    Reply
    Page 2 of 3 | Prev |   1   2   3   | Next
    dantonic | # 11 | 2009-04-05, 23:30 | Report

    Canola was just an example. I don't really use it much anymore. But I guess the same thing happens with other programs.

    @Brent
    Wow your usage goes back down to one bar? After using what programs and for how long?

    Anyone else share my experience?

    @Neatojo
    the load applet allows me to look at a list of processes and their memory usage, but also i would not know which ones i need or not.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by dantonic; 2009-04-05 at 23:47.

     
    GeraldKo | # 12 | 2009-04-05, 23:51 | Report

    I haven't checked htop, and I don't see a problem in Load Applet, but, judging subjectivley, my experience is more like Dantonic's than BrentDC's. I find if I open many windows in MicroB or in Tear, things seem to slow down and rebooting fixes it. Even stopping and restarting the browser does not seem as effective as a reboot.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    neatojones | # 13 | 2009-04-06, 00:15 | Report

    Originally Posted by GeraldKo View Post
    ... Even stopping and restarting the browser does not seem as effective as a reboot.
    Are you sure you aren't running some version of Windows on your tablet?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BrentDC | # 14 | 2009-04-06, 00:26 | Report

    Originally Posted by dantonic View Post
    Canola was just an example. I don't really use it much anymore. But I guess the same thing happens with other programs.

    @Brent
    Wow your usage goes back down to one bar? After using what programs and for how long?

    Anyone else share my experience?
    My most used applications are MicroB, Mediabox, Pygtkeditor, RSS Reader, MyTube, Emelfm2, Terminal, App Manager, PDF Reader, Tear, Leafpad, Vagalume, etc. I shut down the device every night and turn it on every morning. I probably use 75% of the above listed apps every day (opening & closing them more than once), and use an array of other apps, too (I boot from a 2gb sd card, and it is almost completely filled with apps!).

    My device is always just as responsive as when I first boot it after closing everything down (namely the browser, it sucks down quite a bit of memory when open).

    The only thing 'different' with my device is that I boot off an sd card and have a massive partition for swap (~400 mb).

    But my device was always like that, even before I made the huge swap partition (the swap is for debian applications, mostly).

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to BrentDC For This Useful Post:
    dantonic

     
    dantonic | # 15 | 2009-04-06, 01:40 | Report

    Originally Posted by BrentDC View Post
    My most used applications are MicroB, Mediabox, Pygtkeditor, RSS Reader, MyTube, Emelfm2, Terminal, App Manager, PDF Reader, Tear, Leafpad, Vagalume, etc. I shut down the device every night and turn it on every morning. I probably use 75% of the above listed apps every day (opening & closing them more than once), and use an array of other apps, too (I boot from a 2gb sd card, and it is almost completely filled with apps!).

    My device is always just as responsive as when I first boot it after closing everything down (namely the browser, it sucks down quite a bit of memory when open).

    The only thing 'different' with my device is that I boot off an sd card and have a massive partition for swap (~400 mb).

    But my device was always like that, even before I made the huge swap partition (the swap is for debian applications, mostly).

    I understand that your device remains responsive when using those apps, but what i'm trying to get at is slightly different.
    When I use my everyday apps like maemo mapper, gpe calendar todo list, almost ti calc, mediaplayer, mplayer, mytube, and I switch among them my device also remains as responsive as before.
    This does not take away from the fact that memory leaks are still occurring. I think the leaks do not keep incrementing, for example if I open mediaplayer and when I close it it leaves some unnecessary process running taking up memory, when I go to open it again later in the day, I guess it would use that already open process as opposed to reopening a new instance of it.
    (mediaplayer as an example.)


    Although these unnecessary processes do not interfer when I'm using small apps, and when I'm using them a few at the same time, they do interfere when I'm trying to run a heavier app like Openoffice or when I'm using several small apps at once.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BrentDC | # 16 | 2009-04-06, 02:38 | Report

    Originally Posted by dantonic View Post
    I understand that your device remains responsive when using those apps, but what i'm trying to get at is slightly different.
    When I use my everyday apps like maemo mapper, gpe calendar todo list, almost ti calc, mediaplayer, mplayer, mytube, and I switch among them my device also remains as responsive as before.
    This does not take away from the fact that memory leaks are still occurring. I think the leaks do not keep incrementing, for example if I open mediaplayer and when I close it it leaves some unnecessary process running taking up memory, when I go to open it again later in the day, I guess it would use that already open process as opposed to reopening a new instance of it.
    (mediaplayer as an example.)


    Although these unnecessary processes do not interfer when I'm using small apps, and when I'm using them a few at the same time, they do interfere when I'm trying to run a heavier app like Openoffice or when I'm using several small apps at once.
    I understand what you are saying, I occasionally run apps like OpenOffice, GIMP, etc., and see no difference in performance when running them right after a reboot or not. Of course, a lot of Nokia's apps seem to have "daemon's" or whatever, but they probably come up right at boot anyway? (that's a guess).

    But after I close all apps, my load-applet is always 1/4 bars.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by BrentDC; 2009-04-06 at 02:44.
    The Following User Says Thank You to BrentDC For This Useful Post:
    dantonic

     
    dantonic | # 17 | 2009-04-06, 05:22 | Report

    Wow I'm so jealous of you!


    Not sure what's going on with my tablet then, maybe I just need a brand new reflash... idk

    I'm very curious to know what everyone else's experience is like regarding this, I'd like to figure out if I'm one of the select few, along with GeraldKo

    Edit | Forward | Quote | Quick Reply | Thanks

     
    odius | # 18 | 2009-04-06, 07:25 | Report

    i've got an 8gig n810 and in a few years the omap4 chip's will be out !!
    loading my tablet up with goodies, and will be getting a solar charger, and studying the sdk's

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by odius; 2009-04-06 at 07:31.

     
    maacruz | # 19 | 2009-04-06, 08:47 | Report

    If you fill the RAM with applications, some of it will go to the swap file/partition. Once you close those apps the swapped memory remains in swap, and so when booting a new application which needs something which is in swap, it may start slower because the time needed to load what it needs from swap.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to maacruz For This Useful Post:
    dantonic

     
    shadowjk | # 20 | 2009-04-06, 15:31 | Report

    In the case of opening many many windows in the browser being fast-ish the first time and slow-ish subsequent times is partly a side effect of swapping to sd/mmc.

    Despite what you might think, random writes to flash are very very slow. A 4k write from the OS/device migh require the card itself to first read 256-512k of data, modify 4k of it, and write back 256-512k, because its native block size is that huge.
    You don't notice this causing any slowdown with photos, videos, songs and so on, because they're pretty large.

    The first time you push your tablet's memory use close to and over its physical SDRAM capacity, the swap file/partition is empty, the OS can pick whatever it wants from ram that it thinks is least needed and write it out sequentially. It might achieve rates of over megabyte per sec the first time.

    After you've closed the browser, you might use programs that had parts of themselves swapped out to flash, those get read back in then on a as-needed basis. A copy is retained on flash in case the os wants to swap out that exact same thing again it wont have to write, it can just drop it from ram. The program might write to or change that memory though, in which case the chunk on flash is freed and has to be written again if OS wants to swapout. A form of fragmentation happens in the swapfile.

    Thus, the next time you open loads of browser windows, the swapout of other programs wont happen sequentially to flash, instead it will be a little piece here, a little piece there, in random order. This is extremely slow compared to firt time. It's not unusual for memory cards to drop to speeds of 16 KILObytes/sec or worse under such loads. Brand name cards no exception. Higher class cards might help, unless they consist of multichannel flash in a parallell setup, which might make blocksize bigger, which makes random write speed worse (but boosting sequential write speed).

    So one source of slowdown over time is swap "fragmentation" and flash-based storage's inherent allergy towards seek-heavy write loads.

    Programs themselves might grow bigger over time due to internal heap fragmentation as well, which will make you run into swapping faster.

    Neither of these things are memory leaks.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by shadowjk; 2009-04-06 at 15:35. Reason: clarify
    The Following 5 Users Say Thank You to shadowjk For This Useful Post:
    dantonic, gary201, maacruz, qwerty12, sjgadsby

     
    Page 2 of 3 | Prev |   1   2   3   | Next
vBulletin® Version 3.8.8
Normal Logout