This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gnu.gcj.RawData vs. long
- From: Craig Vanderborgh <craigvanderborgh at gmail dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 18 Jul 2011 12:08:06 -0400
- Subject: gnu.gcj.RawData vs. long
Hello all:
I am working to make some of our code more portable. We "gcj-ified"
our source several years back, including making liberal use of
gnu.gcj.RawData * class members to store pointers for native (CNI)
code within object instances.
The problem is that gnu.gcj.RawData * is not portable. The question
is: can I use "long" for the type instead without garbage collection
problems? Can my native code store the pointer value in a Java "long"
in the CNI with impunity, or will Boehm GC think these pointers needs
to be considered for collection?
Please advise.
Thanks in advance,
Craig Vanderborgh
Voxware Incorporated