2
0
Эх сурвалжийг харах

Add some functions to control Gc memory usage

Hugh 10 жил өмнө
parent
commit
9c9ab92895
1 өөрчлөгдсөн 15 нэмэгдсэн , 0 устгасан
  1. 15 0
      std/cpp/vm/Gc.hx

+ 15 - 0
std/cpp/vm/Gc.hx

@@ -92,6 +92,21 @@ class Gc
       untyped __global__.__hxcpp_exit_gc_free_zone();
    }
 
+   static public function setMinimumFreeSpace(inBytes:Int) : Void
+   {
+      untyped __global__.__hxcpp_set_minimum_free_space(inBytes);
+   }
+
+   static public function setTargetFreeSpacePercentage(inPercentage:Int) : Void
+   {
+      untyped __global__.__hxcpp_set_target_free_space_percentage(inPercentage);
+   }
+
+   static public function setMinimumWorkingMemory(inBytes:Int) : Void
+   {
+      untyped __global__.__hxcpp_set_minimum_working_memory(inBytes);
+   }
+
    @:unreflective
    inline static public function setFinalizer<T>(inObject:T, inFinalizer:cpp.Callable<T->Void> ) : Void
    {