commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1091324 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/HeapPointer.java java/org/apache/commons/runtime/MemoryPointer.java native/include/acr/pointer.h native/shared/clazz.c native/shared/pointer.c
Date Tue, 12 Apr 2011 08:36:21 GMT
Author: mturk
Date: Tue Apr 12 08:36:21 2011
New Revision: 1091324

URL: http://svn.apache.org/viewvc?rev=1091324&view=rev
Log:
Use HeapPointer since it is heap allocated

Added:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/HeapPointer.java
      - copied, changed from r1091323, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java
Removed:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java
Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h
    commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
    commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c

Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/HeapPointer.java
(from r1091323, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/HeapPointer.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/HeapPointer.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java&r1=1091323&r2=1091324&rev=1091324&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/HeapPointer.java
Tue Apr 12 08:36:21 2011
@@ -17,17 +17,17 @@
 package org.apache.commons.runtime;
 
 /**
- * Represents the Operating System C/C++ pointer.
+ * Represents the Operating System C/C++ heap allocated pointer.
  *
  * @since Runtime 1.0
  */
-final class MemoryPointer extends Pointer
+final class HeapPointer extends Pointer
 {
 
     private static native void free0(long p)
         throws Throwable;
 
-    private MemoryPointer()
+    private HeapPointer()
     {
         // No instance
     }
@@ -35,7 +35,7 @@ final class MemoryPointer extends Pointe
     /*
      * Only created from JNI code.
      */
-    private MemoryPointer(long ptr, long len)
+    private HeapPointer(long ptr, long len)
     {
         POINTER = ptr;
         PLENGTH = len;

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h?rev=1091324&r1=1091323&r2=1091324&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h Tue Apr 12 08:36:21
2011
@@ -33,13 +33,13 @@ extern "C" {
 
 ACR_CLASS_CTOR(ConstPointer);
 ACR_CLASS_DTOR(ConstPointer);
-ACR_CLASS_CTOR(MemoryPointer);
-ACR_CLASS_DTOR(MemoryPointer);
+ACR_CLASS_CTOR(HeapPointer);
+ACR_CLASS_DTOR(HeapPointer);
 
 jobject
 AcrNewConstPointer(JNI_STDENV, void *ptr, size_t len);
 jobject
-AcrNewMemoryPointer(JNI_STDENV, void *ptr, size_t len);
+AcrNewHeapPointer(JNI_STDENV, void *ptr, size_t len);
 
 #ifdef __cplusplus
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c?rev=1091324&r1=1091323&r2=1091324&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c Tue Apr 12 08:36:21 2011
@@ -222,7 +222,7 @@ AcrLoadRuntimeClasses(JNI_STDENV)
     ACR_CLASS_LOAD(Callback);
     ACR_CLASS_LOPT(Unsafe);
     ACR_CLASS_LOPT(ConstPointer);
-    ACR_CLASS_LOPT(MemoryPointer);
+    ACR_CLASS_LOPT(HeapPointer);
     ACR_CLASS_LOPT(FileDescriptor);
 
 #ifdef WIN32
@@ -236,7 +236,7 @@ AcrUnloadRuntimeClasses(JNI_STDENV)
 {
 
     ACR_CLASS_UNLOAD(ConstPointer);
-    ACR_CLASS_UNLOAD(MemoryPointer);
+    ACR_CLASS_UNLOAD(HeapPointer);
     ACR_CLASS_UNLOAD(FileDescriptor);
     ACR_CLASS_UNLOAD(Callback);
     ACR_CLASS_UNLOAD(Unsafe);

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c?rev=1091324&r1=1091323&r2=1091324&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c Tue Apr 12 08:36:21 2011
@@ -29,7 +29,7 @@ J_DECLARE_CLAZZ = {
     0,
     0,
     0,
-    ACR_CLASS_PATH "MemoryPointer"
+    ACR_CLASS_PATH "HeapPointer"
 };
 
 J_DECLARE_M_ID(0000) = {
@@ -54,7 +54,7 @@ J_DECLARE_F_ID(0001) = {
     "J"
 };
 
-ACR_CLASS_CTOR(MemoryPointer)
+ACR_CLASS_CTOR(HeapPointer)
 {
     int rv;
 
@@ -69,7 +69,7 @@ ACR_CLASS_CTOR(MemoryPointer)
     return 0;
 }
 
-ACR_CLASS_DTOR(MemoryPointer)
+ACR_CLASS_DTOR(HeapPointer)
 {
     AcrUnloadClass(env, &_clazzn);
 }
@@ -80,7 +80,7 @@ AcrNewGenericPointer(JNI_STDENV, void *p
     jobject po;
 
     if (!CLAZZ_LOADED) {
-        ACR_THROW_MSG(ACR_EX_EINSTANCE, "MemoryPointer not initialized");
+        ACR_THROW_MSG(ACR_EX_EINSTANCE, "HeapPointer not initialized");
         return 0;
     }
     po = (*env)->NewObject(env, _clazzn.i, J4MID(0000), P2J(ptr), (jlong)len);
@@ -89,7 +89,7 @@ AcrNewGenericPointer(JNI_STDENV, void *p
     return po;
 }
 
-ACR_JNI_EXPORT(void, MemoryPointer, free0)(JNI_STDARGS, jlong ptr)
+ACR_JNI_EXPORT(void, HeapPointer, free0)(JNI_STDARGS, jlong ptr)
 {
     AcrFree(J2P(ptr, void *));
 }



Mime
View raw message