2
0

NativeGc.hx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package cpp;
  2. extern class NativeGc
  3. {
  4. @:native("__hxcpp_gc_mem_info")
  5. static public function memInfo(inWhatInfo:Int) : Float;
  6. @:native("_hx_allocate_extended") @:templatedCall
  7. static public function allocateExtended<T>(cls:Class<T>, size:Int) : T;
  8. @:native("_hx_add_finalizable")
  9. public static function addFinalizable( instance:{ function finalize():Void; }, inPin:Bool ): Void;
  10. @:native("hx::InternalNew")
  11. public static function allocGcBytesRaw( inBytes : Int, isContainer:Bool ): RawPointer<cpp.Void>;
  12. inline public static function allocGcBytes( inBytes : Int ): Pointer<cpp.Void>
  13. {
  14. return Pointer.fromRaw( allocGcBytesRaw(inBytes, false) );
  15. }
  16. @:native("__hxcpp_enable") extern
  17. static public function enable(inEnable:Bool) : Void;
  18. @:native("__hxcpp_collect") extern
  19. static public function run(major:Bool) : Void;
  20. @:native("__hxcpp_gc_compact") extern
  21. static public function compact() : Void;
  22. @:native("__hxcpp_gc_trace") extern
  23. static public function nativeTrace(sought:Class<Dynamic>,printInstances:Bool) : Int;
  24. @:native("__hxcpp_gc_do_not_kill") extern
  25. static public function doNotKill(inObject:Dynamic) : Void;
  26. @:native("__hxcpp_get_next_zombie") extern
  27. static public function getNextZombie() : Dynamic;
  28. @:native("__hxcpp_gc_safe_point") extern
  29. static public function safePoint() : Void;
  30. @:native("__hxcpp_enter_gc_free_zone") extern
  31. static public function enterGCFreeZone() : Void;
  32. @:native("__hxcpp_exit_gc_free_zone") extern
  33. static public function exitGCFreeZone() : Void;
  34. @:native("__hxcpp_set_minimum_free_space") extern
  35. static public function setMinimumFreeSpace(inBytes:Int) : Void;
  36. @:native("__hxcpp_set_target_free_space_percentage") extern
  37. static public function setTargetFreeSpacePercentage(inPercentage:Int) : Void;
  38. @:native("__hxcpp_set_minimum_working_memory") extern
  39. static public function setMinimumWorkingMemory(inBytes:Int) : Void;
  40. }