aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-05-28 18:53:06 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-05-28 19:53:06 +0100
commitca60dce284a912a0e62500ed6b097c1960dce26e (patch)
treea45dca3a962b2788d50822d0c51a8159a48662d5 /libjava/gnu
parent0919ed7222874f28a047d4ace01e15efd7edfe7d (diff)
downloadgcc-ca60dce284a912a0e62500ed6b097c1960dce26e.zip
gcc-ca60dce284a912a0e62500ed6b097c1960dce26e.tar.gz
gcc-ca60dce284a912a0e62500ed6b097c1960dce26e.tar.bz2
gcj.texi (Object allocation): Remove _Jv_AllocBytes.
* gcj.texi (Object allocation): Remove _Jv_AllocBytes. (Mixing with C++): Document JvAllocBytes and RawDataManaged. * gcj/cni.h (JvAllocBytes): New public CNI function. Calls _Jv_AllocBytes. * gnu/gcj/RawDataManaged.java: New file. * java/lang/Thread.java (data): Declare as RawDataManaged. * java/lang/natThread.cc (init_native): Cast natThread data to RawDataManaged, not jobject. * Makefile.am (ordinary_java_source_files): Add RawDataManaged. * Makefile.in: Rebuilt. From-SVN: r82372
Diffstat (limited to 'libjava/gnu')
-rw-r--r--libjava/gnu/gcj/RawDataManaged.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/libjava/gnu/gcj/RawDataManaged.java b/libjava/gnu/gcj/RawDataManaged.java
new file mode 100644
index 0000000..91a36ac
--- /dev/null
+++ b/libjava/gnu/gcj/RawDataManaged.java
@@ -0,0 +1,23 @@
+/* Copyright (C) 2004 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package gnu.gcj;
+
+/** A type used to indicate special data used by native code. Unlike the
+ <code>RawData</code> type, fields declared as <code>RawDataManaged</code>
+ will be "marked" by the memory manager and considered for garbage
+ collection.
+
+ Native data which is allocated using CNI's <code>JvAllocBytes()</code>
+ function and stored in a <code>RawDataManaged</code> will be automatically
+ freed when the Java object it is associated with becomes unreachable. */
+
+public final class RawDataManaged
+{
+ private RawDataManaged() { }
+}