harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r820583 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main: java/org/apache/harmony/luni/platform/ native/luni/shared/ native/luni/unix/ native/luni/unix/aix/ native/luni/unix/freebsd/ native/luni/unix/linux/ native/luni/unix/macos...
Date Thu, 01 Oct 2009 09:17:37 GMT
Author: tellison
Date: Thu Oct  1 09:17:36 2009
New Revision: 820583

URL: http://svn.apache.org/viewvc?rev=820583&view=rev
Log:
Take out OSResourcesMonitor and make malloc calls from Java simple again.

Removed:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSResourcesMonitor.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSResourcesMonitor.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/aix/
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/freebsd/
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/linux/
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/macosx/
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/zos/
Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java?rev=820583&r1=820582&r2=820583&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
Thu Oct  1 09:17:36 2009
@@ -129,12 +129,7 @@
 	 * @throws OutOfMemoryError
 	 *             if the request cannot be satisfied.
 	 */
-	public long malloc(long length) throws OutOfMemoryError
-    {
-        OSResourcesMonitor.ensurePhysicalMemoryCapacity();
-        return mallocNative(length);  
-    }
-    private native long mallocNative(long length) throws OutOfMemoryError;
+	public native long malloc(long length) throws OutOfMemoryError;
 
 	/**
 	 * Deallocates space for a memory block that was previously allocated by a

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c?rev=820583&r1=820582&r2=820583&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c Thu
Oct  1 09:17:36 2009
@@ -25,7 +25,7 @@
 #include "IMemorySystem.h"
 #include "exceptions.h"
 
-JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_mallocNative
+JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_malloc
   (JNIEnv * env, jobject thiz, jlong size)
 {
   PORT_ACCESS_FROM_ENV (env);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h?rev=820583&r1=820582&r2=820583&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h Thu
Oct  1 09:17:36 2009
@@ -43,10 +43,10 @@
     (JNIEnv *, jclass);
 /*
  * Class:     org_apache_harmony_luni_platform_OSMemory
- * Method:    mallocNative
+ * Method:    malloc
  * Signature: (J)J
  */
-  JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_mallocNative
+  JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_malloc
     (JNIEnv *, jobject, jlong);
 /*
  * Class:     org_apache_harmony_luni_platform_OSMemory

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt?rev=820583&r1=820582&r2=820583&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt Thu
Oct  1 09:17:36 2009
@@ -146,7 +146,7 @@
 Java_org_apache_harmony_luni_platform_OSMemory_getPointerSizeImpl
 Java_org_apache_harmony_luni_platform_OSMemory_getAddress
 Java_org_apache_harmony_luni_platform_OSMemory_setAddress
-Java_org_apache_harmony_luni_platform_OSMemory_mallocNative
+Java_org_apache_harmony_luni_platform_OSMemory_malloc
 Java_org_apache_harmony_luni_platform_OSMemory_free
 Java_org_apache_harmony_luni_platform_OSMemory_memmove
 Java_org_apache_harmony_luni_platform_OSMemory_memset
@@ -210,6 +210,5 @@
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_isReachableByICMPImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_inheritedChannel
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_oneTimeInitializationImpl
-Java_org_apache_harmony_luni_platform_OSResourcesMonitor_isSystemPhysicalMemoryLow
 Java_org_apache_harmony_luni_platform_Environment_getEnvBytes
 Java_org_apache_harmony_luni_platform_Environment_getEnvByName

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile?rev=820583&r1=820582&r2=820583&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile Thu Oct
 1 09:17:36 2009
@@ -38,7 +38,7 @@
 	$(SHAREDSUB)filedesc.o $(SHAREDSUB)timezone.o \
 	$(SHAREDSUB)OSFileSystem.o OSFileSystemLinux32.o \
 	$(SHAREDSUB)OSMemory.o OSMemoryLinux32.o $(SHAREDSUB)OSNetworkSystem.o \
-	OSNetworkSystemLinux.o $(HY_OS)/OSResourcesMonitor.o hyenv.o 
+	OSNetworkSystemLinux.o hyenv.o 
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)



Mime
View raw message