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.

Is there any way to find out how much memory size has my applet taken up?

JavaCard Applet Development Related Questions and Answers.
Squli
Posts: 13
Joined: Wed Sep 14, 2016 4:06 am
Points :156
Contact:

Is there any way to find out how much memory size has my applet taken up?

Post by Squli » Thu Feb 15, 2018 1:48 am

Is there any way to find out how much memory size has my applet taken up?
can anyone help me ?

Ponele
Posts: 13
Joined: Fri Oct 20, 2017 3:02 am
Points :308
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by Ponele » Thu Feb 15, 2018 1:00 pm

COR ? COD? Or Persistent Memory?

User avatar
Tolice
Posts: 40
Joined: Wed May 20, 2015 2:41 am
Points :254
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by Tolice » Fri Feb 16, 2018 5:06 am

You can write another applet to get your applet size, as following steps:
- 1, Get card memory size named M1;
- 2, Load your applet to the card and get card memory size named M2;
- 3, Your applet used memory size named M, and M = M1 - M2

Squli
Posts: 13
Joined: Wed Sep 14, 2016 4:06 am
Points :156
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by Squli » Fri Feb 16, 2018 9:57 pm

Ponele wrote:COR ? COD? Or Persistent Memory?


I want to get the three types of memory size.

Squli
Posts: 13
Joined: Wed Sep 14, 2016 4:06 am
Points :156
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by Squli » Fri Feb 16, 2018 10:01 pm

Tolice wrote:You can write another applet to get your applet size, as following steps:
- 1, Get card memory size named M1;
- 2, Load your applet to the card and get card memory size named M2;
- 3, Your applet used memory size named M, and M = M1 - M2



Thanks, But how can I get the card memory size?

User avatar
Tolice
Posts: 40
Joined: Wed May 20, 2015 2:41 am
Points :254
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by Tolice » Sun Feb 25, 2018 10:03 pm

You can using the function of JCSystem.getAvailableMemory(byte memoryType) to obtains the amount of memory of the specified type.

javacardx
Posts: 9
Joined: Thu Sep 10, 2015 4:43 am
Points :520
Contact:

Re: Is there any way to find out how much memory size has my applet taken up?

Post by javacardx » Mon Feb 26, 2018 2:18 am

There are two API functions relating with MEMORY SIZE in following (which is v1 and v2 that copy from package javacard.framework.JCSystem ).

v1:public static short getAvailableMemory(byte memoryType) throws SystemException //javacard 2.2.2
v2:public static void getAvailableMemory(short[] buffer, short offset,byte memoryType)throws SystemException //javacard 3.0 classic

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 52 guests

JavaCard OS : Disclaimer