Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

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: 12
Joined: Wed Sep 14, 2016 4:06 am
Points: 142
Contact:

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

Postby 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: 306
Contact:

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

Postby Ponele » Thu Feb 15, 2018 1:00 pm

COR ? COD? Or Persistent Memory?

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

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

Postby 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: 12
Joined: Wed Sep 14, 2016 4:06 am
Points: 142
Contact:

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

Postby 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: 12
Joined: Wed Sep 14, 2016 4:06 am
Points: 142
Contact:

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

Postby 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: 29
Joined: Wed May 20, 2015 2:41 am
Points: 172
Contact:

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

Postby 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: 512
Contact:

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

Postby 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


Return to “Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer