Commit Graph

328 Commits

Author SHA1 Message Date
Roberto Ierusalimschy c37b7b3cca bug: garbage collector can trigger too many times in recursive loops,
because it was not computing the size of CallInfo structures in threads
2013-04-26 15:26:49 -03:00
Roberto Ierusalimschy 75250a237c typos in comments 2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy 437a49be5e cast to avoid warnings 2013-03-15 15:33:36 -03:00
Roberto Ierusalimschy a799ed5af9 more precise control for GC pause (based on threshold) 2012-10-19 16:00:33 -03:00
Roberto Ierusalimschy fdae4b9453 removed commented-out line (for debugging) 2012-10-03 09:36:17 -03:00
Roberto Ierusalimschy ae1d318822 small bug: generational mode is always in 'propagate' mode only
outside the collector: during collection of course it must go to
other modes.
2012-09-11 09:53:08 -03:00
Roberto Ierusalimschy e4f609d0ee collector in generational mode must be in 'propagate' state when
not running a collection
2012-07-04 12:52:38 -03:00
Roberto Ierusalimschy 4fc15bbfb7 major collections in generational mode are triggered by comparison with
the memory estimate from last major collection
2012-07-02 10:40:05 -03:00
Roberto Ierusalimschy c510d94549 includes counts from 'sweeptolive' in cost of atomic step 2012-05-31 18:28:59 -03:00
Roberto Ierusalimschy ab2c3d5cde small bug in error handling of finalizers (cannot call lua_tostring
inside the core) + small bug in luaC_checkfinalizer (when avoiding
remove object being sweeped from sweep list) + small changes in GC
pace control (for the atomic part)
2012-05-31 17:26:14 -03:00
Roberto Ierusalimschy 6fcdfc6d4f bug: object being moved to 'finobj' list might not be sweeped by
the collector
2012-05-30 13:01:10 -03:00
Roberto Ierusalimschy 6efffb9acd only count in 'atomic' objects marked for the first time 2012-05-29 14:52:17 -03:00
Roberto Ierusalimschy 51e8f08e60 more efficient way to apply 'stepmul' + some changes in GC parameters 2012-05-28 17:41:00 -03:00
Roberto Ierusalimschy e29f3a5751 definition of 'GCSTEPSIZE' moved to header file + small changes 2012-05-23 12:43:14 -03:00
Roberto Ierusalimschy 8e7149f496 detail ('char' should be 'const char') 2012-05-22 15:38:56 -03:00
Roberto Ierusalimschy 086da10dac merge of fields 'lastmajormem' (used in gen. mode) and 'estimate'
(used in inc. mode)
2012-05-22 14:50:39 -03:00
Roberto Ierusalimschy b36b4b521f try to avoid sweeping new objects created with new white (and
therefore not collectable in the current cycle)
2012-05-22 14:32:25 -03:00
Roberto Ierusalimschy 398811a313 simpler macro 'luaC_condGC' + better 'step' in 'lua_gc' +
micro bug in 'luaC_checkfinalizer' (current sweep object could be
removed from 'allgc' list)
2012-05-21 10:18:10 -03:00
Roberto Ierusalimschy 2a66b34f72 revamp of the GC pace control; more like 5.1: any X Kbytes allocated
makes the GC handle f(X) Kbytes of objects
2012-05-20 17:36:44 -03:00
Roberto Ierusalimschy ea980fdeef removed 'stringmark' trick 2012-05-14 14:52:56 -03:00
Roberto Ierusalimschy 31829ad177 test for whether collector is running moved from function to
macro 'luaC_condGC'.
2012-05-11 16:22:33 -03:00
Roberto Ierusalimschy 3cadc37f47 no more 'Proto' objects on the stack. Protos are anchored on outer
Protos or on a Closure, which must be created before the Proto.
2012-05-08 10:53:33 -03:00
Roberto Ierusalimschy a4b96ce9a3 first implementation of long strings 2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy fb6eee2805 Lua never uses Ã'assert' (it is always 'lua_assert') 2012-01-23 20:59:02 -02:00
Roberto Ierusalimschy fd22ccd6d0 object tag keeps variant bits too -> no need for 'isC' field in
Closures + more strick typing for closure variants
2012-01-20 20:05:50 -02:00
Roberto Ierusalimschy 01747f2c24 error message: "tag method" -> "metamethod" 2011-12-02 11:18:41 -02:00
Roberto Ierusalimschy 217b65e6d9 avoid some warnings about converting 32-bit shifts into 64-bit results 2011-11-28 15:25:48 -02:00
Roberto Ierusalimschy 788a0ecd27 'luaC_separateudata' renamed to 'separatetobefnz' and called only
from 'lgc.c'
2011-10-03 14:54:25 -03:00
Roberto Ierusalimschy bc90cf4b83 retraverse all gray lists together to avoid traversing some weak
tables twice (as they may change lists when traversed)
2011-10-03 13:22:05 -03:00
Roberto Ierusalimschy 87912786af dead objects are not collectable. 2011-09-24 18:12:01 -03:00
Roberto Ierusalimschy 95ed6c1127 better(?) scheme for cleaning weak tables; all ressurected objects
are removed from weak values before finalization
2011-09-24 18:00:40 -03:00
Roberto Ierusalimschy 45c346645c avoid clearing ephemeron tables that have nothing to be cleaned
(no white elements)
2011-09-19 14:03:38 -03:00
Roberto Ierusalimschy 74b0bb3a45 macro 'checkconsistency' moved to this file, as it is used only
here
2011-05-05 16:42:25 -03:00
Roberto Ierusalimschy 868ff40339 full collection does not restart collector + avoid changing GC
state if an error happens in a step
2010-12-29 16:00:23 -02:00
Roberto Ierusalimschy 551b076f1c change in the relationship between totalbytes and GCdebt - luaM_realloc_
is too critical to update two counters
2010-12-20 17:40:07 -02:00
Roberto Ierusalimschy 737f119187 better control for GC running or stopped 2010-12-20 16:17:46 -02:00
Roberto Ierusalimschy 350cc4bcb6 'micro' bug: when closing state, old objects are finalized (breaking
assertion)
2010-12-03 09:48:25 -02:00
Roberto Ierusalimschy 9b7a12c46d finalizers (__gc) for tables 2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy 4590a89b32 corrected warnings from different compilers (mostly casts and small
details)
2010-10-25 17:01:37 -02:00
Roberto Ierusalimschy 6828f6d427 new parameter 'majorinc' to control frequency of major collections
in generational mode
2010-09-03 11:14:01 -03:00
Roberto Ierusalimschy a71c5f6f53 typo in comments 2010-06-30 11:11:17 -03:00
Roberto Ierusalimschy d9ea6eca7c macro 'key2tal' replaced by 'gkey' (as both were equal) 2010-06-25 09:18:10 -03:00
Roberto Ierusalimschy fabe4ec487 better barrier for prototypes 2010-06-07 13:55:34 -03:00
Roberto Ierusalimschy 575074fd85 Lua closures are cached for reuse 2010-06-04 10:25:10 -03:00
Roberto Ierusalimschy e94fac8956 bug: generational collection was not running collector! (must write
a test for this...)
2010-06-02 15:36:58 -03:00
Roberto Ierusalimschy 3d45a8eb1c really stop collection during finalizers 2010-05-17 17:39:31 -03:00
Roberto Ierusalimschy 4fd76b8148 avoid "strong" cast 2010-05-11 17:49:26 -03:00
Roberto Ierusalimschy 1c1a98e872 corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
2010-05-10 15:23:45 -03:00
Roberto Ierusalimschy c006f085d9 new macro 'resetoldbit' 2010-05-10 13:46:49 -03:00
Roberto Ierusalimschy de97177744 avoid 'else assert' (which may result in an empty else) 2010-05-07 15:43:24 -03:00