Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

Commands to get free and used memory sizes in Java card

JavaCard Applet Development Related Questions and Answers.
maheshk
Posts: 2
Joined: Mon Apr 11, 2016 2:53 am
Points :15
Contact:

Commands to get free and used memory sizes in Java card

Post by maheshk » Mon Apr 11, 2016 5:17 am

Hi,
I have created one applet which runs fine on Java card. Now I want to know how much EEPROM is free/used. Also I want to know free/used ROM size if possible. Is there any way to know how much RAM any applet uses at run time?
Please suggest if any JCshell commands or Java Card applet commands are available to find out these details.
Thank you.

trgorce
Posts: 17
Joined: Mon Feb 29, 2016 2:44 am
Points :146
Contact:

Re: Commands to get free and used memory sizes in Java card

Post by trgorce » Mon Apr 11, 2016 11:36 pm

maheshk wrote:Hi,
I have created one applet which runs fine on Java card. Now I want to know how much EEPROM is free/used. Also I want to know free/used ROM size if possible. Is there any way to know how much RAM any applet uses at run time?
Please suggest if any JCshell commands or Java Card applet commands are available to find out these details.
Thank you.


As far as I know, there is no ready command to get these information. But you can ask your card provider to offer these command.

maheshk
Posts: 2
Joined: Mon Apr 11, 2016 2:53 am
Points :15
Contact:

Re: Commands to get free and used memory sizes in Java card

Post by maheshk » Tue Apr 12, 2016 12:36 am

I'm using SmartMX J3D081 Java card (with JCOP v.2.4.2 R2 and Java card open spec v.3.0.4). I didn't find any information regarding this in their documents.
If there are no readymade commands, is there any other way to get this information?

User avatar
Ellisun
Posts: 50
Joined: Wed May 20, 2015 3:47 am
Points :472
Contact:

Re: Commands to get free and used memory sizes in Java card

Post by Ellisun » Tue Apr 12, 2016 6:14 am

maheshk wrote:I'm using SmartMX J3D081 Java card (with JCOP v.2.4.2 R2 and Java card open spec v.3.0.4). I didn't find any information regarding this in their documents.
If there are no readymade commands, is there any other way to get this information?



There are three types memory sizes, you can write an applet to get these memory sizes, the API function is:

JCSystem.getAvailableMemory(byte memoryType);

and the memoryType are JCSystem.MEMORY_TYPE_PERSISTENT, JCSystem.MEMORY_TYPE_TRANSIENT_RESET and JCSystem.MEMORY_TYPE_TRANSIENT_DESELECT.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 40 guests

JavaCard OS : Disclaimer