Android Question How to expand Memory allocation

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hello everyone, in a data exchange with server, using B4XSerializator, I get this error because there are many data

java.lang.OutOfMemoryError: Failed to allocate a 524 byte allocation with 4075447 free bytes and 3MB until OOM; failed due to fragmentation (required continguous free 65536 bytes for a new buffer where largest contiguous free 32768 bytes)

Is there a way to increase the buffer or time or other advice to compress the data?

thank you
 

DonManfred

Expert
Licensed User
Longtime User
Reduce the amount of data you are requesting.
If you for example get 100.000 Entries as data then you should split them....
Request Items 1-50 - handle the 50 items...
Request Items 51-100 - handle the 50 items...
Request Items 101-150 - handle the 50 items...
[...]

There is no way to raise the memory.

What kind of data do you get? A big CSV file? XML, json?
 
Upvote 0
Top