Changing the Java Heap Size

We need:
1) WinImage
2) FactoryFs extracted from your Firmware

Step 1:

Open your FactoryFs with WinImage
Go to directory **\Exe\Java ** and copy to desktop the file jwc_properties.ini

Step 2:

Open your jwc_properties.ini with Notepad and at the bottom find this item:

## Limited MVM configuration ##
MAIN_MEMORY_CHUNK_SIZE = 12582912 # (12 * 1024 * 1024) + (0 * 1024), 12.0MB
JAVA_MAX_HEAP_SIZE = 10485760 # (10 * 1024 * 1024) + (0 * 1024), 10MB
JAVA_MIN_HEAP_SIZE = 2097152 # (2 * 1024 * 1024) + (0 * 1024), 2MB
MAX_ISOLATES = 2 # AMS Isolate + One application

MAIN_MEMORY_CHUNK_SIZE – basic (whole) piece of heap-memory
JAVA_MAX_HEAP_SIZE – the maximum size to which the heap-memory can expand JAVA_MIN_HEAP_SIZE – starting (initial) threshold heap-memory

Calculate the starting threshold heap-memory (JAVA_MIN_HEAP_SIZE)

For example

Min Heap Size 5mb = (5 * 1024 * 1024) + (0 * 1024) = 5242880
Max Heap Size 12mb =(12 * 1024 * 1024) + ( 0 * 1024) = 12582912
Add 5242880 to 12582912 = 17825792 which is (17 * 1024 * 1024) + (0 * 1024)- this is the MAIN_MEMORY_CHUNK_SIZE

Step 3:

Now we have

## Limited MVM configuration # #
MAIN_MEMORY_CHUNK_SIZE = 17825792 # (17 * 1024 * 1024) + (0 * 1024), 17.0MB
JAVA_MAX_HEAP_SIZE = 12582912 # (12 * 1024 * 1024) + (0 * 1024), 12MB
JAVA_MIN_HEAP_SIZE = 5242880 # (5 * 1024 * 1024) + (0 * 1024), 5MB
MAX_ISOLATES = 2 # AMS Isolate + One application

Copy the amended jwc_properties.ini back to **\Exe\Java ** with WinImage. Save the file and then flash your phone with the complete Firmware.

I just copied and pasted the amended part to the original jwc_properties.ini overwriting the file.

Leave a comment

Filed under Samsung S5233W Stuff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s