Maxium Applets; Applets vs Memory

1. Is there any restriction on number of application(applets) on a

java card.

2. Is there any constraints on memory usage for an applet

3. Is there any information about minum and maximum memory

requirement for using javacard.

3a. what would be minimum memory requirement to execute one

application(applet) on a javacard.

[367 byte] By [vskaya] at [2007-11-27 5:12:21]
# 1

The only restriction is the memory available on the card. That's why the industry is rapidly expanding the memory. So you may store post-issuance pictures, biometrics, etc. The minimum memory on the card to execute on applet depends on your applet. Also, the constraints on memory usage for an applet really depends on available memory after the applet had been loaded onto the card.

Joseph.Smitha at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

ad 1)

There is no direct limit for the number of applets from the Java Card specifications.

For practical limits asks your card vendor.

ad 2)

No direct limits.

For the applet itself the CAP file format has some limitations, e.g. offsets in the method component (where byte codes are stored) cannot be larger than 65535. To circumvent this limit, put some code into a library package.

For applet data, arrays are limited to 32767 elements, applets can simply "allocate" several of them to circumvent this barrier.

ad 3)

No. Look at the data sheets from several vendors. They state what they think is a sensible memory constellation for a Java Card. Ask them for the underlying chip properties and you know what the chip offers in memory dimensions and what the platform offers to the user.

ad 3a)

Minimal applet size, on-card, is maybe something like 100 bytes (EEPROM).

lionkinga at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
Lionking, Good points on #2. I forgot about those(mainly because I've never reached that limit!)
Joseph.Smitha at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

thanks for your info.

What would be the memory size of Java VM.

Basically I would like to know minimum memory requirement for one applet to executed.

Memory size of VM : ?

Memory size of Java OS: ?

Memory size of Java Card API: ?

Any body have tried accessing 15 applet at same time. I think 15 channels are available at a time to access applets.

vskaya at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5

I don't know from where to get the minimum values, so I searched the web:

"JavaCard consists of a JVM, an API for smart cards and a framework that provides system services for smart-card applications. The minimum system requirement is 16 KB of ROM, 8 KB of EEPROM and 256 bytes of RAM."

http://www2.sys-con.com/ITSG/virtualcd/java/archives/0309/sagar/index.html

You have to ask a Java Card vendor for specific values. Much depends on how the actual implementation (consistency and cyclic-redundancy checks for security, ...) is done and what the target platform is, i.e. chip characteristica (8,16 or 32 bit, memory model, assembly code density, ...). I doubt that they can provide this information as they normally do not offer a "minimal" Java Card.

Java Card does not yet support multithreading therefore running an applet on every available channel (there can be more than 15) is not a problem. Even if it is a multi-interface card the IO is processed sequentially by a dispatcher.

lionkinga at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 6

I still have to say it depends. If you have a card with just synchronous algorithms then the footprint would be smaller than if you have a card that implements synchronous and asynchronous. Also, if you have a card that implements GC verses one that doesn't. Or a card with GP verses one without. Also, a JCRE implementor may engineer their own JC and therefore could be larger or smaller than one licensed from Sun.

I wouldn't worry about what is already masked in the card. You can't change that. Turn your focus on the available space for your applet/s and data. The old rule of thumb was a 32k card only had 18-21k available, so when 64k cards started hitting the street, they would really be 72k so you have REAL 64k available. Some code had to reside in soft mask and that used up the EEPROM space on the card.

Bottom line, it's a question for your card manufacturer for the true available EEPROM space.

Joseph.Smitha at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 7
Thanks lionking and smith for the information.
vskaya at 2007-7-12 10:33:10 > top of Java-index,Java Mobility Forums,Consumer and Commerce...