Android Question How to measure the ram occupation of an app?

amorosik

Expert
Licensed User
How to measure the ram occupation of an app?
In a post we discussed the need to use StringBuilder instead of the simple string concatenation to conserve the ram space used
The advice was correct from a theoretical point of view, and I think it is also correct from a practical point of view
But is there a way to measure the ram occupation of a running app?
Where by 'measuring' I mean precisely to the single occupied byte
In short, if I have an app that uses StringBuilder to join two strings and the same app that uses string concatenation with the symbol & (new_string = string1 & string2), how to measure the ram occupation of the first and second app ?
 

MicroDrie

Well-Known Member
Licensed User
Erel has give here an explanation about the use of [B4X] Smart String Literal. As you can see, the smart string can also be use d to manipulate the results. So basically a string in memory has an overhead of the name and the length of the string content. It depends on how smart the calculation of the smart string is done version the the needed memory used by write-out the calculation of the smart string in traditional calculation steps. However, it is called "smart String" my guess it is less string and it is advice to use by erel.
 
Upvote 0
Top