BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-03-2009, 08:37 PM   #1
btesoroni
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8830
PIN: N/A
Carrier: VERIZON
Posts: 21
Default memory leak?

Please Login to Remove!

From what I'm reading, it sounds like I'm having a serious memory leak. I am running the Hybrid V3 and within 24 hours I went from 30mb to 4 mb. my daily applications I run are viigo and slacker. Is there a way to find out what holding all my memory and how to release it?
Offline  
Old 04-03-2009, 08:42 PM   #2
Thatzmister2u
Retired BBF Moderator
 
Thatzmister2u's Avatar
 
Join Date: Feb 2007
Location: Nor Cal
Model: 9000
PIN: ups! ;)
Carrier: AT&T
Posts: 5,890
Default

Quote:
Originally Posted by btesoroni View Post
From what I'm reading, it sounds like I'm having a serious memory leak. I am running the Hybrid V3 and within 24 hours I went from 30mb to 4 mb. my daily applications I run are viigo and slacker. Is there a way to find out what holding all my memory and how to release it?
Battery pull while the device is on to reclaim it. Uninstall apps one a time to find the culprit.

Be sure to properly close applications using the Menu>End or (close) never use the Red end key as it just places in the background where it will continue to eat memory. To see what is running press ALT + ESCAPE. Anything above the base five apps is extra.

Good Luck!

E-
__________________
Unlocked | AT&T BES
*gasp* Un-protected...


www.horizonwirelessonline.com - Unlocks and Repairs
Offline  
Old 04-05-2009, 10:42 AM   #3
JasonSamfield
Thumbs Must Hurt
 
Join Date: Mar 2009
Location: San Marcos, TX, USA
Model: 9530
OS: 4.7.0.75
PIN: 3053D7B3
Carrier: Verizon
Posts: 165
Default

I finally found some wonderful information about the memory usage on the BlackBerry.

Quote:
Memory Management

Managing Memory
The BlackBerry® Java® Virtual Machine manages memory usage on the BlackBerry device. The BlackBerry JVM allocates memory, performs garbage collection, and automatically swaps data between SRAM and flash memory. The BlackBerry JVM must also share available memory between the BlackBerry device applications and the BlackBerry® Java Application. The memory capabilities represent the total amount of available memory, which is larger than the available working memory when all of the applications and associated application data exist on the BlackBerry device.
BlackBerry "Device Memory"
BlackBerry® devices include the following types of memory:
Flash Memory
The BlackBerry operating system and all application modules are stored persistently in flash memory. When a BlackBerry device user turns on the BlackBerry device, the core operating system and the BlackBerry® Java Application modules use approximately 10 MB to 15 MB of flash memory, depending on the version. Flash memory can store the BlackBerry device user's email messages, organizer data, and other personal information, as well as the data that a BlackBerry Java Application stores in memory.

SRAM
SRAM controls the transient data objects and runtime processes.

MicroSD Expandible Memory Card
The microSD card stores media files, documents, and persistent data from a
BlackBerry Java Application.
Key Resources to Reserve
Flash memory
The persistent storage space that is available on the BlackBerry® device is a fixed amount of flash memory, typically in the range of 8 MB to 64 MB.

Persistent object handles
The handles that are assigned to each persistent object are consumed only by persistent objects. The amount of flash memory on the BlackBerry device determines the fixed number of persistent object handles in the system.

Object handles
Each object and array of primitives has an object handle associated with it. The amount of flash memory
on the BlackBerry device determines the fixed number of object handles in the system.
And also this information about low memory conditions occurring on the system.

Quote:
Best practice: Minimizing memory use
To minimize runtime memory, consider the following guidelines:
• Use primitive types (such as int or Boolean) instead of objects (such as String or Integer).
• Do not depend entirely on the garbage collector.
• Avoid creating many objects quickly.
• Set object references to null when you are finished using them.
• Reuse objects as much as possible.
• Move heavy processing to the server. For example, you can filter or sort data before sending it to the BlackBerry® device.
Managing low memory availability
The low memory manager handles memory resources on the BlackBerry® device when the available memory resources fall below a certain threshold. The low memory manager attempts to free used memory to provide more available memory on the BlackBerry device. All applications, including BlackBerry® Java Applications, should work with the low memory manager to free as much memory as possible when the BlackBerry device is low on memory resources.
Identifying low memory availability on a BlackBerry device
The following conditions can cause the low memory manager to attempt to free memory resources:
• The amount of available flash memory on the BlackBerry® device falls below a certain threshold. The flash memory threshold depends on the amount of free RAM in the system. The flash memory threshold ranges between 400 KB and 800 KB.
• The number of persistent object handles that are available on the BlackBerry device falls below 1000 persistent object
handles.
• The number of object handles that are available on the BlackBerry device falls below 1000 object handles.
And finally this information regarding garbage collection by the JVM and essentially memory management and control of the system when in operation.

Quote:
Garbage collection on a BlackBerry device

RAM garbage collection on a BlackBerry device
The BlackBerry® Java® Virtual Machine initiates a RAM garbage collection operation only when the BlackBerry JVM cannot allocate an object because of a lack of space in RAM. The RAM garbage collection operation typically takes 500 to 600 milliseconds to execute. The garbage collection operation removes any freshly allocated variables that are no longer referenced in RAM. To make sure that the lack of a reference in RAM is a sufficient condition for removing the object, a RAM garbage collection operation can only be performed when objects have not been paged out to flash memory.
Full garbage collection on a BlackBerry device
The full garbage collection operation executes for 1 second on average and should take less than 2 seconds to complete.

The full garbage collection operation performs the following actions:
• It performs a RAM garbage collection operation.
• It marks objects in flash memory that are no longer referenced or no longer persisted.
• It releases any nonpersistent object handles in RAM and flash memory.
The system might initiate a full garbage collection operation in the following situations:
• The BlackBerry® Java® Virtual Machine cannot allocate an object because of a lack of available space in RAM.
• A process is about to exceed its currently allocated heap size.
• The BlackBerry JVM cannot allocate a new object because the object handles are not available.
• The BlackBerry device is idle.
Idle garbage collection on a BlackBerry device
Garbage collection does not occur every time that the BlackBerry® device idles. It occurs only when the system considers a garbage collection operation to be beneficial for optimal system performance and maximized battery performance.

To improve performance without impacting the BlackBerry device user experience, the system attempts to perform the following garbage collection operations when the BlackBerry device idles:
• A full garbage collection operation can occur when the BlackBerry device idles for a relatively small amount of time.
• A thorough garbage collection operation can occur when the BlackBerry device idles for a significant period of time.
This is also interesting to note, but apparently Aerize has been able to circumvent this or so it seems.

Quote:
Security considerations

...

Access to memory
The BlackBerry® Java® Development Environment is designed to inhibit applications from causing problems accidentally or maliciously in other applications or on the BlackBerry device. BlackBerry applications can write only to the BlackBerry device memory that the BlackBerry® Java® Virtual Machine uses; they cannot access the virtual memory or the persistent storage of other applications (unless they are specifically granted access to do so). A BlackBerry® Java Application can only access persistent storage or user data, or communicate with other applications, through specific BlackBerry APIs. Research In Motion must digitally sign a BlackBerry Java Application that uses these BlackBerry APIs, to provide an audit trail of applications that use sensitive APIs.
I believe that this is the reason why Aerize only works when you reinstall an application because Aerize cannot "break into" the already installed persistent application storage in the flash memory section of the device memory that applications are installed into apparently.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


IBM  oem Manual Selectric 2000 Quietwriter Typewriter 6750 / 6750-2 Operators picture

IBM oem Manual Selectric 2000 Quietwriter Typewriter 6750 / 6750-2 Operators

$25.00



Lot of 2 IBM Correctable Ribbon Cassette Black 1299300 NOS Original OEM picture

Lot of 2 IBM Correctable Ribbon Cassette Black 1299300 NOS Original OEM

$12.00



New 2 Sets of 2 (4) keys total OEM 9952 IBM Keys for Cash Drawers Displays Locks picture

New 2 Sets of 2 (4) keys total OEM 9952 IBM Keys for Cash Drawers Displays Locks

$14.99



IBM Correcting OEM Selectric Motor Assembly + ON/OFF Switch & Cord works *Video* picture

IBM Correcting OEM Selectric Motor Assembly + ON/OFF Switch & Cord works *Video*

$28.88



IBM WHEELWRITER TYPEWRITER TRANSPORT MOTOR Series II - OEM wheelwriter parts picture

IBM WHEELWRITER TYPEWRITER TRANSPORT MOTOR Series II - OEM wheelwriter parts

$28.00



OEM  IBM Type 5441 WheelWriter 3 1356658 1362400-02 Main Boards Tested Working picture

OEM IBM Type 5441 WheelWriter 3 1356658 1362400-02 Main Boards Tested Working

$49.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.