Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>The Gemalto .NET Card contains both persistent memory and volatile memory that are used for data storage. The persistent memory acts as persistent storage for the card - data persists in it even after the card is removed from a smart card reader. Volatile memory is reset when the card loses power and cannot be used for persistent storage.</p> </blockquote> <p>how you store your data, and how you fill the BookList with data ? please clarify more.</p> <p>you have memory limitation of course, so you cannot store up to certain size, in this .net card you have 16KB of volatile memory (RAM) and 70KB of persistent memory (that contain assemblies, storage memory).</p> <p>I tested in some Gemalto .net card and able to store 20KB of data in persistent storage memory, after that limit i get the same exception OutOfMemoryException (because the other 50KB is filled with files, assemblies).</p> <p>This card is not designed to store database, records and so on, its used to store critical information like keys and passwords. So don't save more than this size and your code will be fine, or use any text compression algorithm (in the client application) to reduce the size before storage in card, but in the end don't try to store more than this ~XX KB.</p> <p><strong>update</strong>: Because of this limitation you cannot store more than 70K in persistent storage, also you cannot retrieve more than 16KB from the card to client (because this data will be stored in local variable i.e volatile memory and then retrieved back to your client, and you have constrains also here).</p> <p>So this is the source of your problem, you retrieve more than volatile memory can hold:</p> <pre><code>public string getBook(int index) { return bookList[index].getId() + " , " + bookList[index].getName(); } </code></pre> <p>before return value, this data will be in temporarily variable, and because you can't store more than 16KB you get the exception OutOfMemoryException.</p> <p>the solution is to use this storage directly from the client (you have the reference so just use it):</p> <pre><code>public Book getTheBook(int index) { return bookList[index]; } </code></pre> <p>and from the client you can access Book functionality(make sure your Book is struct because marshalling is supported only for struct and primitive types in Gemalto .net card):</p> <pre><code>Console.WriteLine(service.getTheBook(0).getName()); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload