1. amazinglygraceless's Avatar
    This is actually a very cool thread. I learned about
    three thing in this one alone
    07-16-08 10:32 AM
  2. amazinglygraceless's Avatar
    I'm sorry, it was killing me: memory
    Dude, let's not travel this road, poor girl is probably tired
    of explaining it.
    07-16-08 10:35 AM
  3. bmcclure937's Avatar
    I'm sorry, it was killing me: memory
    Dude, let's not travel this road, poor girl is probably tired
    of explaining it.
    Exactly!! At least inkwell was polite about it... and not extremely rude and inpolite like some members!!

    That is the normal spelling for her, as she is from another country originially. It is natural for her to spell it this way And I think it is kinda neat.
    07-16-08 10:37 AM
  4. Pete6's Avatar
    Here's the deal as I see the BlackBerry memory.

    1. Everything uses memory. Install as few apps as possible. This includes themes.
    2. Some things use memory better than others and put it back when they have finished with it.
    3. The Garbage collector that runs in Java Virtual Machine (JVM) is supposed to fix this. I think that it does not always get all the blocks of free but still allocated memory left by badly behhaved applications.
    4. Clearing the Content Store is a very good idea.
    5. Clearing the System Log is a very good idea.
    6. Using the phone makes the memory loss worse.
    7. A battery pull should never be neccessary. Millions of corporate BES users with no additional apps never, ever do a battery pull.

    Due to 7., I now believe that 1, 2 and 3 are the main causes of memory leak. A battery pull invokes the JVM Garbage Collector as well as zeroing most of the user memory.

    Patrick Waugh who is a JVM programmer and knows a heck of a lot about how the BlackBerry organizes its memory, believes that the memory leak problem is a complete myth. He wrote a long post about it. Similarly a lot of the folks over on the lackBerry Forums think the same. My point 7. seems to agree with this as well.

    The bottom line. The less you have installed and depending on which apps they are, and the less you use the phone, the less of a memory leak problem you will have (mostly).

    We should try to compile a list of the best and worst behaved applications from a memory leak perspective. My guess is that the Instant Messenger apps will come out high amongst the worst behaved apps.
    Last edited by Pete6; 07-16-08 at 10:43 AM.
    07-16-08 10:39 AM
  5. Apollo_Creed's Avatar
    I was just thinking... is everyone positive all of this memory is being recovered because of the Event Log being cleared...?

    After clearing the event log and pulling the battery, all of the recovered memory may not be from the log. Even without clearing the log, you should recover memory when doing a battery pull.

    Just curious, because I am not sure how to exactly pin down how much the log recovered when you are pulling the battery afterwards. I did not notice a significant increase in file free at all And I know many others have not noticed a large increase either.

    I am wondering how long these event logs have piled up to make such a memory mess! Have you ever done a wipe and re-install on your device to start fresh? Upgrade OSes? Anything like that? Just wondering, because people are reporting that this recovers between 2 and 6 megs... and I recovered under 1 Mb... lol!
    Do you keep your Berry cleared daily?? Now u have me thinking about the battery. Still though you,ve had people recover 6 megs or more by doing this. If you keep your Berry cleared daily or every other day, you wouldn't gain much. I'm also glad that you're really thinking about that event log though. If u find something else about it, make a post for us. I don't think that I'm too far off base with that though. But hey, we're all teaching each other!!

    Posted from my CrackBerry at wapforums.crackberry.com
    07-16-08 10:43 AM
  6. amazinglygraceless's Avatar
    Apollo, just out of curiosity, have you done any of the
    memory optimizations. I have and really the only time
    I even think about my memory is when a question
    about available memory get posted on CB. It makes
    for a virtually worry free BB.
    07-16-08 10:47 AM
  7. inkwell's Avatar
    I was just thinking... is everyone positive all of this memory is being recovered because of the Event Log being cleared...?

    After clearing the event log and pulling the battery, all of the recovered memory may not be from the log. Even without clearing the log, you should recover memory when doing a battery pull.

    Just curious, because I am not sure how to exactly pin down how much the log recovered when you are pulling the battery afterwards. I did not notice a significant increase in file free at all And I know many others have not noticed a large increase either.

    I am wondering how long these event logs have piled up to make such a memory mess! Have you ever done a wipe and re-install on your device to start fresh? Upgrade OSes? Anything like that? Just wondering, because people are reporting that this recovers between 2 and 6 megs... and I recovered under 1 Mb... lol!
    I think you are right about this

    Exactly!! At least inkwell was polite about it... and not extremely rude and inpolite like some members!!

    That is the normal spelling for her, as she is from another country originially. It is natural for her to spell it this way And I think it is kinda neat.
    I thought about this afterwards. My apologies to Jenay, I speak other languages and it only dawned on me after posting it.
    07-16-08 10:51 AM
  8. Apollo_Creed's Avatar
    Apollo, just out of curiosity, have you done any of the
    memory optimizations. I have and really the only time
    I even think about my memory is when a question
    about available memory get posted on CB. It makes
    for a virtually worry free BB.
    Yes!! I did the event log everyday when I would switch my battery over. Since the other member posted the thing about the options while in the event log and hiding it, I've already done that also. Now I don't have any events to delete when I switch my batteries out. I'm glad that I bought it up because it was somewhat of a brain teaser figuring out WHERE all of this memory was/is going.

    Posted from my CrackBerry at wapforums.crackberry.com
    07-16-08 10:54 AM
  9. amazinglygraceless's Avatar
    Good deal. I'm glad you started the thread too.
    Lots of good info here.
    07-16-08 10:59 AM
  10. ralarosa's Avatar
    Good thread. I've been clearing the event log every day or so and have all of the options unchecked.

    I also found that apps that stay open (Gmail app for example) use memory also. I deleted the GMail app and use GMail on BIS and the free memory is pretty stable. On the 8120, it hangs around 13 to 14 MB.

    I would thing that IM apps such as Facebook, AOL, etc would use memory too.
    07-16-08 11:02 AM
  11. bmcclure937's Avatar
    Here's the deal as I see the BlackBerry memory.

    1. Everything uses memory. Install as few apps as possible. This includes themes.
    2. Some things use memory better than others and put it back when they have finished with it.
    3. The Garbage collector that runs in Java Virtual Machine (JVM) is supposed to fix this. I think that it does not always get all the blocks of free but still allocated memory left by badly behhaved applications.
    4. Clearing the Content Store is a very good idea.
    5. Clearing the System Log is a very good idea.
    6. Using the phone makes the memory loss worse.
    7. A battery pull should never be neccessary. Millions of corporate BES users with no additional apps never, ever do a battery pull.

    Due to 7., I now believe that 1, 2 and 3 are the main causes of memory leak. A battery pull invokes the JVM Garbage Collector as well as zeroing most of the user memory.

    Patrick Waugh who is a JVM programmer and knows a heck of a lot about how the BlackBerry organizes its memory, believes that the memory leak problem is a complete myth. He wrote a long post about it. Similarly a lot of the folks over on the lackBerry Forums think the same. My point 7. seems to agree with this as well.

    The bottom line. The less you have installed and depending on which apps they are, and the less you use the phone, the less of a memory leak problem you will have (mostly).

    We should try to compile a list of the best and worst behaved applications from a memory leak perspective. My guess is that the Instant Messenger apps will come out high amongst the worst behaved apps.
    Right on!! My insufficient communication skills were unable to convey this!

    If only I would have broken down my thoughts This is a great explanation Pete, and I totally follow your line of thinking and agree!! The issue is complex and confusing, but we do not need to make it that way.

    Third party apps are a big player in memory problems!! The OS itself is not a big culprit and I know that there are problems with the JVM Garbage Collecting!

    What I am trying to say, is that your post is very well organized and makes perfect sense!! Thanks for clarifying... and that is the best answer / explanation in this thread!
    07-16-08 11:08 AM
  12. patrick.waugh's Avatar
    Pete,

    A battery pull invokes the JVM Garbage Collector as well as zeroing most of the user memory.
    A battery pull does not invoke anything, it simple removes power and clears memory just like when you turn off the power on your PC.

    Actually, there is so much mis-information in this thread that I'll probably write an article on my blog and put something in the Berrysoft wiki on this as I get time later this month.

    What you need to know as a user is that what is reported as "File Free" is NOT the actual amount of memory available to your blackberry software. It is only that amount of memory which is currently free (not requiring garbage collection).

    Things basically work like this... a program needs to create an object, so it asks the JVM (java virutal machine aka the OS) for some memory. The JVM allocates the needed memory from "the heap", and reduces the amount of "file free" reported. Sometime later, in a well behaved program, the object is destroyed and the memory is thus put on the curb waiting for the garbage collector to recover it. If available memory gets low, OR your device becomes idle, OR you manually invoke it (OS 4.5), the GC (garbage collector) gathers all the memory and returns it to the free store heap, thus increasing the "file free" reported.

    Keep in mind that the JVM automatically looks after memory for you, and there is no need for you to do the sorts of things mentioned in this post. Why? Because, if you get low in memory, the JVM automatically will start to delete unnecessary things like your log, old emails, etc. In other words, there is no point whatsoever to manually clear your log, or pull your battery.

    In fact, pulling your battery is actually harmful to the electronics, and you should ONLY do so if you have to (like the device is locked up).

    I personally have NEVER pulled the battery on my personal 8820 - EVER!

    Although we are really busy finalizing version 2 of the crackberry launcher, and our first release as well as launching all of our sites, you'll want to stay tuned to our blog, site, and eventually our wiki.

    Things are really crazy right now for us as we setup the backend CRM, Project management, support desk, etc. in preparation for product launches, but I'm going to try to make time to post some cool content on the blog.
    Last edited by patrick.waugh; 07-16-08 at 11:20 AM.
    07-16-08 11:17 AM
  13. IrishJK09's Avatar
    Guys, guess what I've just discovered!! We really don't have any memory leaks but I do stand corrected. I found out where a lot of memory goes but we don't realize it. If you press your ALT button along with LGLG, it will bring up your event log. After this is done click menu and go to clear log to clear it. It will be a good idea to pull your battery afterwards. EVERYTHING that we do on our Berries are recorded and unless you go in and clear that log from time to time, it will tremendously build up giving us the illusion that we have a memory leak. Hence, after that log is cleared, you have all of your original memory back. Again, I do stand corrected!!
    Pulling the battery is giving you back memory more than clearing the event log.

    Theoretical situation:

    You have 12mb free
    You clear the even log and do a battery pull
    You now have 20mb free

    You have 12mb free
    You do a battery pull only
    You now have 19mb free


    Yes, it helps to clear the memory log, but that isn't what is giving you back the large amount of memory, the battery pull is. A battery pull clears all system processes and completely ends all applications, thus returning the memory they had tied up. It also clears out logged internet info that eats into memory.

    The problem with BlackBerrys isn't so much that they have memory "leaks," but instead that they have too little memory left over after the OS footprint, and that the device isn't properly optimized to use the memory for what needs it, and return it when it is done.

    Here's the deal as I see the BlackBerry memory.

    1. Everything uses memory. Install as few apps as possible. This includes themes.
    2. Some things use memory better than others and put it back when they have finished with it.
    3. The Garbage collector that runs in Java Virtual Machine (JVM) is supposed to fix this. I think that it does not always get all the blocks of free but still allocated memory left by badly behhaved applications.
    4. Clearing the Content Store is a very good idea.
    5. Clearing the System Log is a very good idea.
    6. Using the phone makes the memory loss worse.
    7. A battery pull should never be neccessary. Millions of corporate BES users with no additional apps never, ever do a battery pull.

    Due to 7., I now believe that 1, 2 and 3 are the main causes of memory leak. A battery pull invokes the JVM Garbage Collector as well as zeroing most of the user memory.

    Patrick Waugh who is a JVM programmer and knows a heck of a lot about how the BlackBerry organizes its memory, believes that the memory leak problem is a complete myth. He wrote a long post about it. Similarly a lot of the folks over on the lackBerry Forums think the same. My point 7. seems to agree with this as well.

    The bottom line. The less you have installed and depending on which apps they are, and the less you use the phone, the less of a memory leak problem you will have (mostly).

    We should try to compile a list of the best and worst behaved applications from a memory leak perspective. My guess is that the Instant Messenger apps will come out high amongst the worst behaved apps.

    I don't think it is accurate to say that no corporate users experience battery pulls. I have personally owned Berrys with NO apps (no IM use either) installed and still had my memory drop significantly after as little as 6 hours. I also have friends with corporate issue BlackBerrys that are tied to their company's BES and they have complained to me about losing message logs, and I explained the battery pull to them. These were people with Berrys locked down by every IT policy imaginable mind you and had 0 third party apps installed, as well as had certain pre-loaded apps disabled (IM).

    If millions of corporate Berry users don't do battery pulls, I would imagine it is due to lack of knowledge more than lack of need.
    07-16-08 11:19 AM
  14. Crucial_Xtreme's Avatar
    Apollo, I believe you have created one of the BEST threads in a LONG time brother... Everybodies contributed and been respectful and polite, and members can learn something. Awesome, as this is how it should be.
    07-16-08 11:26 AM
  15. Pete6's Avatar
    Pulling the battery is giving you back memory more than clearing the event log.

    Theoretical situation:

    You have 12mb free
    You clear the even log and do a battery pull
    You now have 20mb free

    You have 12mb free
    You do a battery pull only
    You now have 19mb free


    Yes, it helps to clear the memory log, but that isn't what is giving you back the large amount of memory, the battery pull is. A battery pull clears all system processes and completely ends all applications, thus returning the memory they had tied up. It also clears out logged internet info that eats into memory.

    The problem with BlackBerrys isn't so much that they have memory "leaks," but instead that they have too little memory left over after the OS footprint, and that the device isn't properly optimized to use the memory for what needs it, and return it when it is done.




    I don't think it is accurate to say that no corporate users experience battery pulls. I have personally owned Berrys with NO apps (no IM use either) installed and still had my memory drop significantly after as little as 6 hours. I also have friends with corporate issue BlackBerrys that are tied to their company's BES and they have complained to me about losing message logs, and I explained the battery pull to them. These were people with Berrys locked down by every IT policy imaginable mind you and had 0 third party apps installed, as well as had certain pre-loaded apps disabled (IM).

    If millions of corporate Berry users don't do battery pulls, I would imagine it is due to lack of knowledge more than lack of need.
    What I said was that there are millions of corporate BES users who never, ever do a battery pull and these people have no extra apps installed. Whether the need to do battery pull sor not is not really relevant, they ar just not doing them.

    I base this on my dealings with two large multination companies here in Switzerland. One has 200+ BlackBerys on BES and the other several hundred. The IT manager of the smaller company was surpeised when I saked him how often his users did a battery pull. He did not even know what it was. The tech guy at the larger company says that his users are not told how to do this and when he looks at the BES uptime logs, many BlackBerrys have run for YEARS without a battery pull.

    My number of millions is based on this eveidence and the fact that the IT manager guy said that he went to a RIM course and the concept of battery pulls was not even discussed unless for very specific reasons and then never for end-users to do as part of normal use.

    I am equally sure that there are any number of corporate users who do do this, especially at night time to stop emails disturbing them.
    07-16-08 11:34 AM
  16. Apollo_Creed's Avatar
    Apollo, I believe you have created one of the BEST threads in a LONG time brother... Everybodies contributed and been respectful and polite, and members can learn something. Awesome, as this is how it should be.
    Yeah, I see!! Thanks!!

    Posted from my CrackBerry at wapforums.crackberry.com
    07-16-08 11:44 AM
  17. jenaywins's Avatar
    Exactly!! At least inkwell was polite about it... and not extremely rude and inpolite like some members!!

    That is the normal spelling for her, as she is from another country originially. It is natural for her to spell it this way And I think it is kinda neat.
    Dude, let's not travel this road, poor girl is probably tired
    of explaining it.
    Lol... Thanks guys.
    07-16-08 12:37 PM
  18. inkwell's Avatar
    I personally have NEVER pulled the battery on my personal 8820 - EVER!
    So essentially, is it the fact that some users may just keep apps open instead of hitting "menu" --> "close"? Because this week I found myself doing that and keeping most of my memory.
    07-16-08 02:34 PM
  19. adambigge's Avatar
    Apollo, I believe you have created one of the BEST threads in a LONG time brother... Everybodies contributed and been respectful and polite, and members can learn something. Awesome, as this is how it should be.
    Of course everybody is respectful and polite. Just look at his avatar Pic!! Ain't nobody in their right mind gonna come into Creed's house and misbehave!
    07-16-08 02:52 PM
  20. IrishJK09's Avatar
    What I said was that there are millions of corporate BES users who never, ever do a battery pull and these people have no extra apps installed. Whether the need to do battery pull sor not is not really relevant, they ar just not doing them.

    I base this on my dealings with two large multination companies here in Switzerland. One has 200+ BlackBerys on BES and the other several hundred. The IT manager of the smaller company was surpeised when I saked him how often his users did a battery pull. He did not even know what it was. The tech guy at the larger company says that his users are not told how to do this and when he looks at the BES uptime logs, many BlackBerrys have run for YEARS without a battery pull.

    My number of millions is based on this eveidence and the fact that the IT manager guy said that he went to a RIM course and the concept of battery pulls was not even discussed unless for very specific reasons and then never for end-users to do as part of normal use.

    I am equally sure that there are any number of corporate users who do do this, especially at night time to stop emails disturbing them.

    Fair enough, but I still hold that apps aren't the only problem. I have had memory problems on every Berry I have owned, several of them completely "clean." For reference, I know well the performance hit multitasking too many things causes, so I would ALWAYS close by the menu option.

    Even with that, I would lose several megabytes of memory in a given day on occasion.

    I really think it is a problem in the core OS design that prevents things from releasing used memory, even OEM apps like Memopad, Tasks, or Calendar.

    Many of the corporate users you are talking about could very well be suffering from memory problems, and the device is simply purging messages and whatnot, so they are unaware. On the IT support side, if the end user never brings it to them to complain, of course they won't know about it.

    Seriously though, how many of those end users really know to look at their File Free at varying times of the day? I struck up a conversation with a corporate Berry user the other day and he didn't even know he could rearrange his home screen, create folders, hide icons, etc. He was handed the device and used it as it came to him. I bet if I asked him what his File Free was, he would look at me like I was crazy.

    I am not trying to be confrontational with you by any means, I am simply stating that I feel there is a real problem with memory allocation in the Berry OS, and not holding RIM accountable will only extend the time before it is fixed.

    Outside of that, 3rd party apps are a huge part of why people buy smartphones in the first place. Sure, a corporation may not allow their end users to install them, but what about the hundreds and hundreds of thousands of small business owners/employees that need certain apps to make their day go more smoothly? A smartphone by definition is a platform for development and that allows for the installation of third party apps to provide advanced device use. Why shouldn't people be able to take advantage of that and use it as it was intended for fear of memory allocation (leaks...) problems?

    The answer is that they shouldn't. They should be able to install those apps they need without a second thought or worry about memory vanishing. Of course they need to be mindful of how much they install because ever device in existence has limited memory, but that doesn't change the fact that they should worry about having plenty of free space that randomly vanishes.

    RIM really needs to do something about it, and pretending everything is fine, when it isn't, is not that answer.
    07-16-08 03:19 PM
  21. bmcclure937's Avatar
    Pete,



    A battery pull does not invoke anything, it simple removes power and clears memory just like when you turn off the power on your PC.

    Actually, there is so much mis-information in this thread that I'll probably write an article on my blog and put something in the Berrysoft wiki on this as I get time later this month.
    Thanks for the great information on this!!

    I had a general understanding and have an understanding of the programming and processes behind everything, but this post helped to clear things up. The garbage collecting description along with the battery pull information was extremely helpful!!
    07-16-08 03:28 PM
  22. patrick.waugh's Avatar
    So essentially, is it the fact that some users may just keep apps open instead of hitting "menu" --> "close"? Because this week I found myself doing that and keeping most of my memory.
    Yes, exactly. I was a victim of this myself till I discovered that not all apps are created equal and use the same "standard" for closing or going to the background. Basically, if you use the menu, you are sure it is closing, but to use ESC or END, invites a problem as that app might just go to the background when you think you are terminating it.
    07-17-08 03:16 AM
  23. Pete6's Avatar
    This is good stuff from Patrick. He knows what he is talking about. I really hope that he has the time to write the definitive guide to BlackBerry memory.

    He is right and I was wrong about the battery pull not invking the Memory Cleaner. I was sure that I had read it somewhere on the RIM site but I can't find it now so I must have been dreaming.
    07-17-08 03:49 AM
  24. Kronk's Avatar
    OK, so we know that once file free gets low enough it will start to clear logs and emails and such, but are you saying beyond that file free has no effect on the operation of the device, ie. more file free = faster operation? I'm still trying to sort through some of this and "relearn" what I thought to be true. Bare with me.
    07-17-08 03:57 AM
  25. patrick.waugh's Avatar
    OK, so we know that once file free gets low enough it will start to clear logs and emails and such, but are you saying beyond that file free has no effect on the operation of the device, ie. more file free = faster operation?
    No, you still don't have it yet.

    "File free" is just a report of memory immediately available to an application. It never is an indicator of the absolute amount of memory available except when you first start the device perhaps (and even then it is only very close).

    When it gets low, this invokes the GC, and if that doesn't free up enough, then the JVM will start deleting stuff.

    Yes, if you run a bunch of apps in the background and thus reduce your file free to a low level, you run the risk of the memory becoming fragmented (like a drive), and having to invoke the GC more often, but worst case, the GC will collect all the memory in a second at most, and it will actually only do this if you aren't doing anything. In other words, your system will run slow, but not due to the GC and low memory, but because you are running many applications on a slow processor!

    I often (due to programming) run my 8820 with 250K file free showing (which is much lower than you should run into), and have no problem with this at all except an occasional brief pause when I switch tasks.
    07-17-08 07:23 AM
124 12345
LINK TO POST COPIED TO CLIPBOARD
";