9 messages in net.java.dev.jna.users[jna-users] Structure toString alloca...
FromSent OnAttachments
ArgynSep 11, 2008 9:30 am 
ArgynSep 11, 2008 9:47 am 
Timothy WallSep 11, 2008 10:24 am 
ArgynSep 11, 2008 10:33 am 
Timothy WallSep 11, 2008 10:59 am 
ArgynSep 11, 2008 11:03 am 
Timothy WallSep 11, 2008 11:14 am 
ArgynSep 11, 2008 11:54 am 
Timothy WallSep 11, 2008 12:12 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:[jna-users] Structure toString allocated vs nativeActions...
From:Argyn (jawa@gmail.com)
Date:Sep 11, 2008 9:30:46 am
List:net.java.dev.jna.users

I'm debugging the VM crash issue when calling the native code.

native function assumes a structure as an argument:

struct{ double * array; } ////

A extends Structure{ Pointer array; }

I initialize array with A.array = new Memory(); array.write(...)

Then I call my native function passing this structure. the function is supposed to populate array with the result.

I call this inside the loop, and print Structre.toString() with System.out.println()

What I noticed is that in the very first print it shows: Pointer array@8=allocated@0x2d46008 (3848 bytes)

but in all subsequent prints it's: Pointer array@8=native@0x2d46008

The diff is "native" vs "allocated". What is this?