Package org.jruby
Class RubyGC
java.lang.Object
org.jruby.RubyGC
GC (Garbage Collection) Module
Note: Since we rely on Java's memory model we can't provide the
kind of control over garbage collection that MRI provides. Also note
that since all Ruby libraries make GC assumptions based on MRI's GC
that we decided to no-op explicit collection through these APIs.
You can use Java Integration in your libraries to force a Java
GC (assuming you really want to).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IRubyObject
auto_compact
(ThreadContext context, IRubyObject recv) static IRubyObject
auto_compact_set
(ThreadContext context, IRubyObject recv, IRubyObject autoCompact) static IRubyObject
compact
(ThreadContext context, IRubyObject recv) static IRubyObject
count
(ThreadContext context, IRubyObject recv) static RubyModule
createGCModule
(ThreadContext context) static IRubyObject
disable
(ThreadContext context, IRubyObject recv) static IRubyObject
enable
(ThreadContext context, IRubyObject recv) static IRubyObject
garbage_collect
(ThreadContext context, IRubyObject recv, IRubyObject[] args) static int
static long
static IRubyObject
measure_total_time
(ThreadContext context, IRubyObject self) static IRubyObject
measure_total_time_set
(ThreadContext context, IRubyObject self, IRubyObject value) static IRubyObject
start
(ThreadContext context, IRubyObject recv, IRubyObject[] args) static IRubyObject
stress
(ThreadContext context, IRubyObject recv) static IRubyObject
stress_set
(ThreadContext context, IRubyObject recv, IRubyObject arg) static IRubyObject
total_time
(ThreadContext context, IRubyObject self)
-
Constructor Details
-
RubyGC
public RubyGC()
-
-
Method Details
-
createGCModule
-
start
-
garbage_collect
public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) -
measure_total_time
-
measure_total_time_set
public static IRubyObject measure_total_time_set(ThreadContext context, IRubyObject self, IRubyObject value) -
total_time
-
enable
-
disable
-
stress
-
stress_set
-
count
-
auto_compact
-
auto_compact_set
public static IRubyObject auto_compact_set(ThreadContext context, IRubyObject recv, IRubyObject autoCompact) -
compact
-
getCollectionCount
public static int getCollectionCount() -
getCollectionTime
public static long getCollectionTime()
-