Storage/Memory Limits

Former Member
Former Member
Hi,

is there any per-device documentation on the maximum amount of storage available to the properties API, and on the maximum amount of runtime memory available?

I'm thinking of a map/navigation/waypoint app/widget/datafield, and would be interested what is feasible and what not.

Also, for that kind of use case, it would be very helpful to be able to share properties between apps and datafields.

Thanks,
Matt
  • When you run the simulator, it displays the amount of memory used and available for the device(this information is stored in <SDKROOT>\bin\devices.xml in case you want to see the limits for each device without starting the simulator). There is also the System.getSystemStats() API which provides this same information to your program as it runs.

    While experimenting with the fr920xt device in the simulator, several of us found the limits of the properties API to be 8KB. This includes a small overhead for the data structures as well as storage of each of the keys and values. If you exceed this limit, you'll get an error from the emulator indicating that it couldn't deserialize the properties file (%TEMP%\GARMIN\APPS\DATA\APP.str), and to resolve the issue, you'll have to delete the file (you may be able to resolve this at runtime with the new properties APIs, but I'm not sure how you'd detect the condition).

    As for apps/widgets/datafields talking to each other, it has been mentioned and I doubt it will be implemented. It sounds like you want to do something like set a destination inside your app, and then have a custom data field tell the user which direction and how far to go to get to that point. In this case, it seems more logical to just keep all of this stuff inside your app.

    Travis
  • Former Member
    Former Member over 10 years ago
    Thanks a lot for all the infos!

    As for apps/widgets/datafields talking to each other, it has been mentioned and I doubt it will be implemented. It sounds like you want to do something like set a destination inside your app, and then have a custom data field tell the user which direction and how far to go to get to that point. In this case, it seems more logical to just keep all of this stuff inside your app.


    The only problem I see here is that as far as I understand, apps - including the included "apps" (activites like Running) - are run exclusively. So say I wanted to add a map display to the standard running mode, my choices are pretty limited at the moment.

    Continuing on limits, are there any words yet on how big apps/widgets/datafields can be as far as app size is concerned (max code size / max resources size etc.)?
  • Continuing on limits, are there any words yet on how big apps/widgets/datafields can be as far as app size is concerned (max code size / max resources size etc.)?

    No, there hasn't been much communicated about this. I'm under the impression that data fields will be more limited (because they have to be dynamically loaded into another app), but I've got no idea what those limits are. Obviously a full fledged app will have the least limitations, but requires the most implementation work.

    Hopefully one of the Garmin guys will respond with some more slushy information.

    Travis
  • For the object store, the 8 kB limit that Travis mentions is correct. This is now talked about in the API documentation for Application.AppBase.setProperty().

    For the maximum amount of RAM available to an app, the devices.xml file gives a decent estimate. Data fields have less memory available due to the fact that multiple data fields can be running at the same time. This isn't reflected very well in the simulator and I've filed a bug report to get this fixed.

    Currently most products have 512 kB set aside on the file system for apps. This is the same storage that is used for activity recording, so we need to make sure that enough space is available for the core device features to still function. Given this, it's best for your apps to be under 128 kB to allow the user to install multiple apps on their device. Most apps should be well below 128 kB, especially data fields. Some watch-apps and widgets may push close to 128 kB though due to bitmaps and custom fonts.