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