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 IRubyObjectauto_compact(ThreadContext context, IRubyObject recv) static IRubyObjectauto_compact_set(ThreadContext context, IRubyObject recv, IRubyObject autoCompact) static IRubyObjectcompact(ThreadContext context, IRubyObject recv) static IRubyObjectcount(ThreadContext context, IRubyObject recv) static RubyModulecreateGCModule(ThreadContext context) static IRubyObjectdisable(ThreadContext context, IRubyObject recv) static IRubyObjectenable(ThreadContext context, IRubyObject recv) static IRubyObjectgarbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) static intstatic longstatic IRubyObjectmeasure_total_time(ThreadContext context, IRubyObject self) static IRubyObjectmeasure_total_time_set(ThreadContext context, IRubyObject self, IRubyObject value) static IRubyObjectstart(ThreadContext context, IRubyObject recv, IRubyObject[] args) static IRubyObjectstress(ThreadContext context, IRubyObject recv) static IRubyObjectstress_set(ThreadContext context, IRubyObject recv, IRubyObject arg) static IRubyObjecttotal_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()
-