07-06-2010 06:03 AM
How do i calculate the size of vector object being persisted to persistant store.? I want to know how much space the vector object utilises in the persistant store, How do i find out? Please help
07-09-2010 10:58 AM
There are no methods to determine this programmatically. However, you can use the memory statistics tools in the BlackBerry Java Plug-in for Eclipse and BlackBerry JDE to observe this while debugging. You can refer to the BlackBerry Memory Statistics and BlackBerry Object views within Eclipse.
07-13-2010 04:32 AM
Hi mark thanks for the reply.
My intention is to show the user how much memory the app is using in persistant store. Say for example the app allows to download mp3 and store in persistant store. So the user can see how much space the objects stored in persistant store are using up and clear the persistant store if they want to.
Is there any way they can do it?
07-13-2010 04:41 AM
Mark is right.
There is no direct way we can calculate exact memory of persisted object.
Assuming that you just want to care about the storage of your application alone. You can fetch the persistence memory accessing the key and fetching the vector from that memory.
Either you can count vector's size. and easily show number of objects stored in memory.
Fetch every object from vector. Count the bytes and convert them into mb and show them, but afaik it will not be convenient way, neither we can get perfact data.