[1801] in java-interest

home help back first fref pref prev next nref lref last post

Native Data Structures

daemon@ATHENA.MIT.EDU (Gabriel Lawrence)
Sun Sep 17 03:36:42 1995

Date: Fri, 15 Sep 1995 15:14:17 -0800
To: java-interest@java.sun.com
From: gabe@ucsd.edu (Gabriel Lawrence)

Howdy,

I have a native library set up, and I'm having some intermittant hangs. I
have a routine that sets up a structure and returns a pointer to the
structure back to the java program. This pointer is then stored in an int
java variable. It is then passed to other native functions as an argument,
and derefrenced to retrieve the struct.

First off, am I doing this in a reasonable way? How are C routines supposed
to allocate memory that will be only used by other C routines? is it safe
to return pointers back to the java side, or will the garbage collector
interfere with the memory that the C code created?

thanx for any tips!

-Gabe

-----------------------------------------------------------------------
                Scripps Institution of Oceanography
                          UC San Diego
                        Wrk: 619.534.8484
-----------------------------------------------------------------------
Hme: 619.455.6506                    http://sio.ucsd.edu/~gabe/


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post