Commit Graph

531 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
0a6b58c3aa weak tables that must be retraversed are kept in 'grayagain' list
until atomic phase (instead of going to their special lists) +
more comments
2014-09-03 13:54:41 -03:00
Roberto Ierusalimschy
df608f842a 'linktable' -> 'linkgclist' (and used for all links with 'gclist') 2014-09-01 14:37:11 -03:00
Roberto Ierusalimschy
07c7fdb9df simpler definition for 'setobj' (trust the compiler for the assignment) 2014-07-29 13:22:24 -03:00
Roberto Ierusalimschy
3c6d0aaa7d 'iswhite' and related macros now can work directly on any object
(no need to convert to 'GCObject')
2014-07-19 12:14:46 -03:00
Roberto Ierusalimschy
e43612aaf6 put the restriction that 'luaC_barrierback' works only on tables
in its prototype
2014-07-19 12:09:37 -03:00
Roberto Ierusalimschy
2898e2fd12 removed useless assertion (gcstate != GCSpause already implied by
other assertions) and wrong assertion (setmetatable uses this barrier
for tables too)
2014-07-19 11:44:19 -03:00
Roberto Ierusalimschy
bb12903120 type 'Udata' refers directly to structure inside the union (union
used only for aligning purposes now)
2014-07-18 11:46:47 -03:00
Roberto Ierusalimschy
ca41b43f53 type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
56137d58ff added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
2014-07-18 09:17:54 -03:00
Roberto Ierusalimschy
9aec500a26 no need for field 'gch' anymore 2014-07-17 14:27:49 -03:00
Roberto Ierusalimschy
b9dcf9974d detail (typos in comments) 2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
4d696c45b9 simpler handling of 'GCScallfin' state + more comments 2014-05-25 16:08:32 -03:00
Roberto Ierusalimschy
4a24883674 'GCmemtrav' does not need to track the entire collection, only each
single step individually
2014-04-04 14:01:04 -03:00
Roberto Ierusalimschy
f61ceee708 LUAI_FUNC is being used only in header files 2014-04-02 13:44:42 -03:00
Roberto Ierusalimschy
0d745ed04c more precise estimation (GCestimate) for total bytes in use after
a GC cycle
2014-04-01 11:06:59 -03:00
Roberto Ierusalimschy
da4811238a details (typos in comments) 2014-03-21 10:52:33 -03:00
Roberto Ierusalimschy
c86b9da022 userdata can have any Lua value as uservalue 2014-02-19 10:52:42 -03:00
Roberto Ierusalimschy
3f78de256e no need to keep threads in a different GC list, now that there is the
'twups' list
2014-02-18 10:46:26 -03:00
Roberto Ierusalimschy
d764cc5522 new list 'twups' to allow traversal of upvalues from dead threads
(+ fixed some problems with cycles involving those upvalues)
2014-02-18 10:39:37 -03:00
Roberto Ierusalimschy
ffa96d988d field 'op' renamed to 'open' 2014-02-15 11:12:01 -02:00
Roberto Ierusalimschy
1cce3e6842 change in the way 'collectgarbage("step", size)' interprets 'size'
(mimicking the way the GC itself behaves when Lua allocates 'size'
Kbytes)
2014-02-14 14:43:14 -02:00
Roberto Ierusalimschy
90b0ac6495 limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c') 2014-02-13 15:25:20 -02:00
Roberto Ierusalimschy
de3b1c9b53 better control for number of finalizers called at each GC cycle
(increases progressively)
2014-02-13 12:46:38 -02:00
Roberto Ierusalimschy
733c58595b no more local collection 2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
6b30774469 detail (better presentation for 'luaC_step') 2014-02-11 10:28:47 -02:00
Roberto Ierusalimschy
ba3586cc90 keep a single list of objects to be finalized (with local and non-local
objects), to ensure finalization order
2014-02-11 10:18:12 -02:00
Roberto Ierusalimschy
88e23f508c details 2013-12-13 13:42:08 -02:00
Roberto Ierusalimschy
c8585efc78 use goto to implement a tail call in 'reallymarkobject' 2013-12-13 13:17:00 -02:00
Roberto Ierusalimschy
4c6dfc342b CallInfo lists shrinks together with their associated stacks 2013-09-17 12:40:06 -03:00
Roberto Ierusalimschy
686e57cf9c GC local pause configurable 2013-09-13 13:21:52 -03:00
Roberto Ierusalimschy
6ca7b63bce check for shrinking string table done only at the end of a GC cycle 2013-09-11 11:56:15 -03:00
Roberto Ierusalimschy
4eeb1831be new names and better order for GC states (sweep first lists that
can have dead objects)
2013-09-11 11:47:08 -03:00
Roberto Ierusalimschy
dd373a8f66 threads are kept in a separated GC list, linked after the main thread 2013-09-11 11:09:55 -03:00
Roberto Ierusalimschy
7061fe1d56 detail: 'sweepstep' checks end of phase after calling 'sweeplist', so
that phases with small lists return 0 at the first call to 'sweepstep'
2013-09-11 10:24:55 -03:00
Roberto Ierusalimschy
d8aa8dd97e objects in list 'tobefnz' have a GC life-cycle like all others
(specifically they are cleaned during sweep phase)
2013-09-11 09:47:48 -03:00
Roberto Ierusalimschy
1150873447 'luaC_newobj' does not handle special cases; only special case
now is threads, which do not use 'luaC_newobj' anymore.
2013-09-11 09:26:14 -03:00
Roberto Ierusalimschy
aeff4f79fa local collection now calls finalizers 2013-09-03 12:37:10 -03:00
Roberto Ierusalimschy
1bf4faec64 new GC state to sweep 'localgc' list + small changes in sweep control 2013-08-30 16:14:26 -03:00
Roberto Ierusalimschy
b5e75fde4e bug: local collection must clear rest of stack 2013-08-29 10:34:16 -03:00
Roberto Ierusalimschy
9a871dd3db tables and userdata all go to local list, too 2013-08-28 15:30:26 -03:00
Roberto Ierusalimschy
90972ff136 LOCALBLACK changed to LOCALMARK and used also to control whether object
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
2013-08-27 17:04:00 -03:00
Roberto Ierusalimschy
af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
742b7377d3 Lua closures go to local, too 2013-08-26 09:41:10 -03:00
Roberto Ierusalimschy
50955e27f5 C functions and strings now go to the local list; first version
of the local collector
2013-08-23 10:34:54 -03:00
Roberto Ierusalimschy
0df6635711 "fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
2013-08-21 17:09:51 -03:00
Roberto Ierusalimschy
ae800656c9 change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
2013-08-21 16:21:16 -03:00
Roberto Ierusalimschy
8f6b80aa1d GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
control)
2013-08-20 14:46:34 -03:00
Roberto Ierusalimschy
9eff921f8f "barrier" for link prototype->cache changed to be consistent with
GC behavior (link is cleared to preserve invariant)
2013-08-19 11:18:43 -03:00
Roberto Ierusalimschy
439d74e29f added 'local' bit (true => object is only refered by local variables) 2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
3679d33b02 barrier conditions rewritten to test first 'isblack' and then 'iswhite'
(during a pause all objects are white, so 'isblack' fails much more
often than 'iswhite')
2013-08-13 14:36:44 -03:00
Roberto Ierusalimschy
78b941039d change to allow collector to stop when it goes to the atomic phase
(just for debugging)
2013-08-07 12:39:09 -03:00
Roberto Ierusalimschy
623e388bb4 double-linked list of all upvalues elliminated and changed to a
traversal of all non-marked threads
2013-08-07 09:18:11 -03:00
Roberto Ierusalimschy
677d90165f no more generational collection !!! 2013-08-05 13:58:28 -03:00
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
Roberto Ierusalimschy
0fac33da9e bug: incremental sweep was not cleaning old bits (as it stopped in the
first old object) + bug: moving udata to 'udgc' list might put old
object in front a new one + some new macros + generational mode may
be in 'pause' state (it just skips 'markroot')
2010-05-07 15:19:36 -03:00
Roberto Ierusalimschy
25951e0ea5 some cleaning in 'sweeplist' (threads do not need to be traversed
if they are going to be collected + use of bit masks to unify
differences in generational and incremental modes)
2010-05-06 15:18:07 -03:00
Roberto Ierusalimschy
d2ea5b00b7 new function 'luaC_changemode' +
bug: objects entering the 'allgc' list must have their OLDBIT cleared
(upvalues being cleared) + bug: in 'checkSizes', KGC_EMERGENCY is
stored in 'gckind' field, not in 'gcstate' + current white changes when
entering sweep phase (so there are dead objects only in that phase)
2010-05-05 15:58:36 -03:00
Roberto Ierusalimschy
7444b5a1d5 better documentation of GC costs 2010-05-05 10:39:58 -03:00
Roberto Ierusalimschy
3e662cec89 full GC must run finalizers only after finishing everything else
(including a return to generational mode if needed)
2010-05-04 15:09:06 -03:00
Roberto Ierusalimschy
aa73403ba4 no need of a KGC_FORCED collection kind; it has the same behavior of
a normal collection
2010-05-03 14:39:48 -03:00
Roberto Ierusalimschy
0c27de2e7b no more 'finalize' phase in GC; finalizers are called along the
entire cycle
2010-05-03 14:33:39 -03:00
Roberto Ierusalimschy
d25f7f9d78 items in 'tobefnz' are kept black (as before recent change) and changed
to white only when needed (being moved to 'allgc' when not keeping
invariant).
2010-05-03 08:55:40 -03:00
Roberto Ierusalimschy
4d871ee973 "gray lists" only need to be valid when 'keepinvariant' is true 2010-04-30 15:37:14 -03:00
Roberto Ierusalimschy
23001d8607 nasty GC bug: upvalue must be turned white when not keeping invariant,
but barrier was not being called when uv->v were already white.
2010-04-29 18:43:36 -03:00
Roberto Ierusalimschy
aaa5d7adab 'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed 2010-04-29 14:32:40 -03:00
Roberto Ierusalimschy
00114a95b2 lots of new comments + small changes in loop controls + other small
"janitor work"
2010-04-26 14:58:00 -03:00
Roberto Ierusalimschy
4aaf0ef75c "to-be-finalized" objects marked and sweeped like all other objects 2010-04-20 17:15:30 -03:00
Roberto Ierusalimschy
d20ff60615 new macro LUA_NUMTAGS 2010-04-12 13:07:29 -03:00
Roberto Ierusalimschy
a09c8d7beb cannot sweep main thread in sweepstring phase 2010-04-05 11:15:35 -03:00
Roberto Ierusalimschy
e54668b696 added proper code to trace garbage collection 2010-04-02 11:37:41 -03:00
Roberto Ierusalimschy
a8d3aa14fd global table now is only kept in the registry 2010-03-29 14:43:14 -03:00
Roberto Ierusalimschy
064e406f67 no more fenvs! 2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
5c87f61e6b major collections in generational mode 2010-03-25 16:37:23 -03:00
Roberto Ierusalimschy
3aa9598177 'mainthread' is not inserted in the 'allgc' list anymore, but swept
separately.
2010-03-25 10:06:36 -03:00
Roberto Ierusalimschy
64d39ed1b6 generational mode no longer sweep old objects 2010-03-24 12:51:10 -03:00
Roberto Ierusalimschy
4433dbb5f5 userdata with finalizers are kept in a separated list ('udgc'), instead
of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
2010-03-24 10:07:01 -03:00
Roberto Ierusalimschy
5cb128ea54 BUG: emergency collector might resize 'strt' (string table) when
creating a new string
+ atomic and markroot steps has some cost
+ full collection must leave collector in proper state when mode
is generational
2010-03-23 17:16:06 -03:00
Roberto Ierusalimschy
74123e9686 draft version of a generational mode for garbage collection. (Not well
tested; no major collections; ...)
2010-03-22 15:28:03 -03:00
Roberto Ierusalimschy
f84b575cfa no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
0bbdddc86b allocator function receives the tag of object being allocated in 'osize'
when 'ptr' is NULL.
2009-12-17 13:46:44 -02:00
Roberto Ierusalimschy
8da245bfd2 better to keep GC state numbers sequential, to optimize switch in
'singlestep'
2009-12-11 19:31:14 -02:00
Roberto Ierusalimschy
a2a2abcba4 new function 'luaC_runtilstate' to advance GC until a "valid" state 2009-12-11 17:14:59 -02:00
Roberto Ierusalimschy
3c4d970a7b comment typos 2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
ce444bff33 (huge) simplification of GC management 2009-11-18 11:13:47 -02:00
Roberto Ierusalimschy
88eb901f81 registry and global table may be changed through the API without a
write barrier, so GC should visit them in the atomic phase.
2009-11-09 16:29:21 -02:00
Roberto Ierusalimschy
a921d81033 avoid using 'ttype' when there is an explicit test + macro 'checkdeadkey'
to avoid repetitions
2009-11-06 15:06:19 -02:00
Roberto Ierusalimschy
9756f56354 better control over accesses to TValue fields 2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy
5bc91c6405 no more one environment per thread: all threads share a single global
environment
2009-10-23 17:12:19 -02:00
Roberto Ierusalimschy
5938212748 information about upvalues (where they come from) kept in Proto structure,
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
1829911d7c some operations may shrink g->totalbytes so g->estimate must be
more flexible
2009-09-28 10:50:34 -03:00
Roberto Ierusalimschy
55dc7fb240 bug: stack must be cleared until its end (including extra size) +
control of stack size moved to 'ldo.c'
2009-07-16 13:26:09 -03:00
Roberto Ierusalimschy
4a67e48611 new macro 'condmovestack' instead of 'condhardstacktests' 2009-06-08 16:35:59 -03:00
Roberto Ierusalimschy
019ebcb85f errors in finalizers are propagated with code LUA_ERRGCMM (ERRor in
__gc MetaMethod)
2009-05-21 17:06:11 -03:00
Roberto Ierusalimschy
673c456cba resize string hash table only when new size is smaller than current one 2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
e091a254df new way to GC stacks: the entire stack must be correct all the times;
the 'dead' part of a stack (after the top) must have only nil's, so
that 'top' may go up without cleaning the stack.
2009-04-28 16:04:36 -03:00
Roberto Ierusalimschy
4f88418170 'CallInfo' stack implemented as double-linked list instead of an array 2009-04-17 11:28:06 -03:00
Roberto Ierusalimschy
ba484b9eb1 yielding across lua_call (first version) 2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
d07abcc6c7 finalizers always called protected 2009-02-17 16:47:58 -03:00
Roberto Ierusalimschy
0c8f5fc2fd simplification in the handling of finalizers: no more 'tmudata' list +
no more GCSsweeptmu collector's state
2008-06-26 16:42:45 -03:00
Roberto Ierusalimschy
c3525610fe bug: when closing the state, 'luaC_separateudata' might mark
userdata in the wrong phase of collection, therefore avoiding
their traversal
2008-06-23 19:07:44 -03:00
Roberto Ierusalimschy
7ba62e2985 code reorganization (only changed comments and order of functions) 2008-06-23 13:51:28 -03:00
Roberto Ierusalimschy
e2b366c760 userdata with finalizers are kept in a separated list 2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
5f0a2f6248 more options for 'kinds' of Garbage Collection + more agressive
shrinking of stacks and string hash
2008-02-11 13:46:03 -02:00
Roberto Ierusalimschy
5e8dd55574 first implementation of ephemerons 2007-10-31 13:41:19 -02:00
Roberto Ierusalimschy
0e961ad47a some changes toward ephemerons 2007-10-29 14:51:20 -02:00
Roberto Ierusalimschy
a7c9e45c64 avoid trailing white spaces 2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
3ca9af51a4 emergency garbage collector (core forces a GC when allocation fails) 2006-07-11 12:53:29 -03:00
Roberto Ierusalimschy
0079efc479 bug: collector did not compensate enough for userdata with finalizers 2006-05-24 11:34:06 -03:00
Roberto Ierusalimschy
c505f341d6 small changes in casts 2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy
4ff1e5b4e1 details 2005-08-24 14:06:36 -03:00
Roberto Ierusalimschy
680fc88cc2 a small bug 2005-08-04 10:37:38 -03:00
Roberto Ierusalimschy
746a1d612b small bug (type error) 2005-06-07 15:53:45 -03:00
Roberto Ierusalimschy
90de38bf1f warnings in VS .Net 2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
6cf85dcc90 metatables for all types 2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
390256edf7 better name for GC pause 2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
4494094031 detail 2005-03-16 17:02:48 -03:00
Roberto Ierusalimschy
370d31a559 luac´ -> luai' (to avoid confusion with other luac stuff) 2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20 `luaconf.h´ exports all its definitions always (so all of them
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
d55bb795fa details 2005-02-23 14:30:22 -03:00
Roberto Ierusalimschy
7d45a5f48f C functions and userdata also have environments 2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
73d7640244 more secure way to stop GC cycles during finalizers 2005-02-14 11:19:50 -02:00
Roberto Ierusalimschy
678d2fb2ac all collected userdata must go to the end of the list of finalizers 2005-02-11 18:03:35 -02:00
Roberto Ierusalimschy
4df8800a01 cleaner way to free all objects 2005-02-10 11:25:02 -02:00
Roberto Ierusalimschy
334ba8132b cleaner way to remark open upvalues 2005-01-18 15:18:09 -02:00
Roberto Ierusalimschy
5be517602e no more generational collector (and no more `noinc' mode) 2005-01-14 12:19:42 -02:00
Roberto Ierusalimschy
e2498e079e change in hash algorithm so that it does not need empty slot
(tables can be 100% full)
2005-01-05 16:20:51 -02:00
Roberto Ierusalimschy
c6254dceff a different option for the GC 2004-12-13 10:15:11 -02:00
Roberto Ierusalimschy
39a8082f50 more options for controling the GC 2004-12-06 15:53:42 -02:00
Roberto Ierusalimschy
0e002005b1 better names for `luaM_free...' macros 2004-11-24 17:20:21 -02:00
Roberto Ierusalimschy
2f82bf6fe9 better support for 64-bit machines 2004-11-24 16:55:56 -02:00
Roberto Ierusalimschy
6f1ea817f5 better control over memory-size overflows 2004-11-19 13:52:40 -02:00
Roberto Ierusalimschy
8050e75f9d bug: gc metamethod must disable GC steps (to avoid nested calls) 2004-10-08 13:00:34 -03:00
Roberto Ierusalimschy
bd38017ddf small optimization for table size in machines with double allignment 2004-10-06 15:34:16 -03:00
Roberto Ierusalimschy
0e54d2be36 bug: barrier was wrong for generational phase 2004-09-15 17:38:15 -03:00
Roberto Ierusalimschy
0de2065f4e tighter tests for stack overflow 2004-09-08 11:23:09 -03:00
Roberto Ierusalimschy
0b06241483 better control for GC cycles 2004-08-30 10:44:44 -03:00
Roberto Ierusalimschy
32d4f304db first implementation of generational GC 2004-08-24 17:12:06 -03:00
Roberto Ierusalimschy
26ae992129 less conservative write barrier for tables 2004-08-10 16:17:23 -03:00
Roberto Ierusalimschy
b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
178246062c reuse `sweeplist' for all lists 2004-03-23 09:57:12 -03:00
Roberto Ierusalimschy
a4e1230f95 better way to control open upvalues 2004-03-15 18:04:33 -03:00
Roberto Ierusalimschy
b876ec61c0 new (temporary?) API for garbage collector 2004-03-09 14:34:35 -03:00
Roberto Ierusalimschy
2aaf7394ad more and better tools (assertions & inspectors) to check incremental GC 2004-02-16 16:09:52 -03:00
Roberto Ierusalimschy
beb2aa5a46 atomic operations are not GC "states" 2003-12-12 16:29:34 -02:00
Roberto Ierusalimschy
47fc57a252 TObject' renamed to TValue' + other name changes and better assertions
for incremental garbage collection
2003-12-10 10:13:36 -02:00
Roberto Ierusalimschy
df429f163a First version of incremental GC 2003-12-09 14:56:11 -02:00
Roberto Ierusalimschy
fe595a45c2 `grayagain' list 2003-12-04 16:52:23 -02:00
Roberto Ierusalimschy
9db1942bac sweep of strings also incremental 2003-12-04 15:22:42 -02:00
Roberto Ierusalimschy
c6eac44a94 two different white flags (to distinguish dead elements from new ones) 2003-12-03 18:03:07 -02:00
Roberto Ierusalimschy
8878554b85 single list for all collectible objects, with udata separated at the
end of the list
2003-12-03 10:30:41 -02:00
Roberto Ierusalimschy
af850484a9 default metatable can be NULL 2003-12-01 16:22:56 -02:00