lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was thinking this is a great idea. However, one can already control GC
manually, as far as I understand, by doing  

collectgarbage("stop ")
...

if(app_thinks_it_is_a_good_time_and_place_to_GC())
	collectgarbage("step", application_GC_step)
...
if(app_thinks_it_is_a_good_time_and_place_to_GC ())
	collectgarbage("step", application_GC_step)

Plugging a custom application allocator allows gathering Lua allocation
statistics on the application side as well. So, looking back at this, it
feels like application can already do whatever it needs with respect to
GC as it is.

Alex

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Mark Hamburg
Sent: Thursday, August 07, 2008 11:32 PM
To: Lua list
Subject: GC tuning idea

Just a quick thought...

It might be interesting to provide a hook in the GC process so that  
clients could postpone the atomic phase for the GC. One would probably  
need to pass in some statistics regarding memory usage so that the  
client could decide whether the memory usage outweighed the risk of  
taking a GC pause.

Mark