4 messages in net.java.dev.jna.usersAW: [jna-users] Getting big string fr...
FromSent OnAttachments
mark...@dlr.deMar 30, 2009 5:53 am 
Timothy WallMar 30, 2009 6:05 am 
mark...@dlr.deMay 4, 2009 1:54 pm.dat
Timothy WallMay 4, 2009 2:30 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:AW: [jna-users] Getting big string from c-libraryActions...
From:mark...@dlr.de (mark@dlr.de)
Date:May 4, 2009 1:54:47 pm
List:net.java.dev.jna.users
Attachments:
winmail.dat - 4k

We do nothing special. We have a special library to read and manipulate xml
files, written in C. These library has a extert-to-string function. So, reading
a 200MB xml file is no problem, but when we try to export the contents to a java
string, then the whole jvm crashes.

Are there maybe any known limitations about this?

Thanks in advance Markus

-----Ursprüngliche Nachricht----- Von: Timothy Wall [mailto:twal@dev.java.net] Gesendet: Mo 30.03.2009 15:05 An: use@jna.dev.java.net Betreff: Re: [jna-users] Getting big string from c-library

You'll have to be a little more specific about what you're doing. Reading a file into a Java String is not an atomic operation where a single implementation is obvious to everyone.

There's no reason you can't allocate that much memory via JNA.

On Mar 30, 2009, at 8:53 AM, <mark@dlr.de> <mark@dlr.de> wrote:

Hello,

we try to use a c-library in our java code, but when we try to get a big string from the c-library to a java string, then our java code crashes when importing more than 80 MB to a java string. But reading a simple ascii file with 100 MB to a java string works fine and fast. Is there a limitation in JNA about this?