mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
Merge pull request #514 from siepkes/runtime-maxfree-support
Added basic support for the Runtime.maxFree() method.
This commit is contained in:
commit
bfc71e3a1e
@ -129,6 +129,8 @@ public class Runtime {
|
|||||||
public native long freeMemory();
|
public native long freeMemory();
|
||||||
|
|
||||||
public native long totalMemory();
|
public native long totalMemory();
|
||||||
|
|
||||||
|
public native long maxMemory();
|
||||||
|
|
||||||
private static class MyProcess extends Process {
|
private static class MyProcess extends Process {
|
||||||
private long pid;
|
private long pid;
|
||||||
|
@ -371,6 +371,12 @@ extern "C" AVIAN_EXPORT int64_t JNICALL
|
|||||||
return t->m->heap->limit();
|
return t->m->heap->limit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" AVIAN_EXPORT int64_t JNICALL
|
||||||
|
Avian_java_lang_Runtime_maxMemory(Thread* t, object, uintptr_t*)
|
||||||
|
{
|
||||||
|
return t->m->heap->limit();
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" AVIAN_EXPORT int64_t JNICALL
|
extern "C" AVIAN_EXPORT int64_t JNICALL
|
||||||
Avian_avian_avianvmresource_Handler_00024ResourceInputStream_getContentLength(
|
Avian_avian_avianvmresource_Handler_00024ResourceInputStream_getContentLength(
|
||||||
Thread* t,
|
Thread* t,
|
||||||
|
@ -360,6 +360,7 @@ public class Misc {
|
|||||||
|
|
||||||
// just test that it's there; don't care what it returns:
|
// just test that it's there; don't care what it returns:
|
||||||
Runtime.getRuntime().totalMemory();
|
Runtime.getRuntime().totalMemory();
|
||||||
|
Runtime.getRuntime().maxMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class Protected { }
|
protected class Protected { }
|
||||||
|
Loading…
Reference in New Issue
Block a user