http://d.puremagic.com/issues/show_bug.cgi?id=3463



--- Comment #128 from Vladimir <thecybersha...@gmail.com> 2011-04-15 02:14:17 
PDT ---
(In reply to comment #127)

Thank you for your insight!

> So from a game's developers point of I need to know when the GC will run 
> either
> by configuration or by manually driving it.  

You can disable automatic garbage collection and manually invoke a collection
right now.

> Both allow me to run a frame with 
> most of the AI and physics disabled to give more of the time to the 
> collector. 

This won't work for multiplayer games where the game state must be kept in sync
on all sides.

> Ideally the GC would be able to run in less time than a single frame (say
> 10-15ms for a 30fps game).

Moving GCs are bound to be slower than the current one, but heap compaction
probably doesn't need to happen as often as a simple GC run to reclaim memory.

> Taking away some amount of time every frame is also acceptable. 
> For example spending 1ms of every frame to do 1ms worth of data
> movement or analysis for compacting would be a reasonable thing to allow, 

The current GC doesn't support incremental runs. Jeremie Pelletier has written
a garbage collector some time ago which can do a shallow scan and only collect
objects with no immediate references: http://pastebin.com/f7a3b4c4a

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to