1. thompson_704's Avatar
    i hear people talking about memory leak this and that but im not sure how exactly what it is. how do u check to see if you have memory leak or not

    thx, im new
    01-23-10 03:02 AM
  2. sedalia066's Avatar
    At the time of a battery pull or a soft reset (alt shift del) memory is cleared and maximized. During the course of normal activity memory is taken and held by apps or other phone functions. A leak is inordinate memory consumption.

    Check in options>memory>application memory. If the number drops drastically during the day you have a leak.

    My 9000 drops about 10 megs on a full day of use. Some loss is normal. More and I worry.


    PM or e-mail if you have other questions and I or someone else does not get back in the forum. I do not always manage to follow these discussions but will try to watch this one.

    Posted from my CrackBerry at wapforums.crackberry.com
    01-23-10 06:43 AM
  3. AmigaDude's Avatar
    First, I'd suggest you not worry about it, since identifying a memory leak is a means of resolving an issue with your phone. For example, your phone gets really slow after being on for a few days, or you get error messages about not enough memory to take a picture, etc.. If you don't have a problem, then you probably don't have a memory leak.

    But if you insist in knowing, technically a memory leak is a software problem with some program where it forgets to release all of the temporary memory that it obtained when starting. The shared memory is there for all of your apps/system to use and they are expected to use any and all of it, but release it when they are finished. So for example, if the Camera app is started and gets 10mb for temporary use, but only releases 9mb when you exit, then you have a memory leak. If you run the app enough times you run out of memory, since each time it looses 1mb. Restarting your phone/computer/etc.. starts everything fresh.
    01-23-10 09:18 AM
  4. Reed McLay's Avatar
    ...
    But if you insist in knowing, technically a memory leak is a software problem with some program where it forgets to release all of the temporary memory that it obtained when starting. The shared memory is there for all of your apps/system to use and they are expected to use any and all of it, but release it when they are finished. So for example, if the Camera app is started and gets 10mb for temporary use, but only releases 9mb when you exit, then you have a memory leak. If you run the app enough times you run out of memory, since each time it looses 1mb. Restarting your phone/computer/etc.. starts everything fresh.

    Thank you, that is about as clear and concise an explanation as any suggested.

    Memory leaks, as described above, can occure when poor programming practices consume memory.

    Fortunaly, that is not a problem with BlackBerry. Sun Java Virtual Machine (VM) is the engine behind BlackBerry and many other embedded and critical applications (NASA is a big user or Sun Java VM). The engineers that created Sun Java have addressed that problem and incorporated automatic memory management.

    Sun Java VM programmers do not have to concern themselves with memory management or the possiblility of a memory leak. It is all taken care of by the automatic memory management of Sun Java.

    So, where does all that memory go?

    As noted, after a restart, all the buffers and caches are purged leaving only applications code, data and settings in memory.

    In order to run effecently, memory is assigned to save certain items to a cache. When that item is re-used, it can be read from the cache instead of repeating the download. That increases the speed and reduces the demand on the cell network.

    The apparent File Free memory will drop as a result, but when the application is idle, or has been closed, the memory used will be returned to the File Free memory pool.

    It is normal for your BlackBerry to use about 10 Mb in normal operation. That memory is used and recycled in the background, you never have to be concerned about it.

    In short, Memory leaks are not an issue with Sun Java VM. Other embedded OS's not so much.... that is why they throw multi-gigabytes of memory at them.
    01-23-10 09:35 AM
  5. jww700's Avatar
    Some nice explanations here. Thanks guys!

    Posted from my CrackBerry at wapforums.crackberry.com
    01-23-10 02:38 PM
LINK TO POST COPIED TO CLIPBOARD