Roberto Ierusalimschy
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
11 years ago
Roberto Ierusalimschy
b5e75fde4e
bug: local collection must clear rest of stack
11 years ago
Roberto Ierusalimschy
9a871dd3db
tables and userdata all go to local list, too
11 years ago
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
11 years ago
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
11 years ago
Roberto Ierusalimschy
742b7377d3
Lua closures go to local, too
11 years ago
Roberto Ierusalimschy
50955e27f5
C functions and strings now go to the local list; first version
of the local collector
11 years ago
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
11 years ago
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
11 years ago
Roberto Ierusalimschy
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
control)
11 years ago
Roberto Ierusalimschy
9eff921f8f
"barrier" for link prototype->cache changed to be consistent with
GC behavior (link is cleared to preserve invariant)
11 years ago
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
11 years ago
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')
11 years ago
Roberto Ierusalimschy
78b941039d
change to allow collector to stop when it goes to the atomic phase
(just for debugging)
11 years ago
Roberto Ierusalimschy
623e388bb4
double-linked list of all upvalues elliminated and changed to a
traversal of all non-marked threads
11 years ago
Roberto Ierusalimschy
677d90165f
no more generational collection !!!
11 years ago
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
12 years ago
Roberto Ierusalimschy
75250a237c
typos in comments
12 years ago
Roberto Ierusalimschy
437a49be5e
cast to avoid warnings
12 years ago
Roberto Ierusalimschy
a799ed5af9
more precise control for GC pause (based on threshold)
12 years ago
Roberto Ierusalimschy
fdae4b9453
removed commented-out line (for debugging)
12 years ago
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.
12 years ago
Roberto Ierusalimschy
e4f609d0ee
collector in generational mode must be in 'propagate' state when
not running a collection
13 years ago
Roberto Ierusalimschy
4fc15bbfb7
major collections in generational mode are triggered by comparison with
the memory estimate from last major collection
13 years ago
Roberto Ierusalimschy
c510d94549
includes counts from 'sweeptolive' in cost of atomic step
13 years ago
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)
13 years ago
Roberto Ierusalimschy
6fcdfc6d4f
bug: object being moved to 'finobj' list might not be sweeped by
the collector
13 years ago
Roberto Ierusalimschy
6efffb9acd
only count in 'atomic' objects marked for the first time
13 years ago
Roberto Ierusalimschy
51e8f08e60
more efficient way to apply 'stepmul' + some changes in GC parameters
13 years ago
Roberto Ierusalimschy
e29f3a5751
definition of 'GCSTEPSIZE' moved to header file + small changes
13 years ago
Roberto Ierusalimschy
8e7149f496
detail ('char' should be 'const char')
13 years ago
Roberto Ierusalimschy
086da10dac
merge of fields 'lastmajormem' (used in gen. mode) and 'estimate'
(used in inc. mode)
13 years ago
Roberto Ierusalimschy
b36b4b521f
try to avoid sweeping new objects created with new white (and
therefore not collectable in the current cycle)
13 years ago
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)
13 years ago
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
13 years ago
Roberto Ierusalimschy
ea980fdeef
removed 'stringmark' trick
13 years ago
Roberto Ierusalimschy
31829ad177
test for whether collector is running moved from function to
macro 'luaC_condGC'.
13 years ago
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.
13 years ago
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
13 years ago
Roberto Ierusalimschy
fb6eee2805
Lua never uses Ã'assert' (it is always 'lua_assert')
13 years ago
Roberto Ierusalimschy
fd22ccd6d0
object tag keeps variant bits too -> no need for 'isC' field in
Closures + more strick typing for closure variants
13 years ago
Roberto Ierusalimschy
01747f2c24
error message: "tag method" -> "metamethod"
13 years ago
Roberto Ierusalimschy
217b65e6d9
avoid some warnings about converting 32-bit shifts into 64-bit results
13 years ago
Roberto Ierusalimschy
788a0ecd27
'luaC_separateudata' renamed to 'separatetobefnz' and called only
from 'lgc.c'
13 years ago
Roberto Ierusalimschy
bc90cf4b83
retraverse all gray lists together to avoid traversing some weak
tables twice (as they may change lists when traversed)
13 years ago
Roberto Ierusalimschy
87912786af
dead objects are not collectable.
13 years ago
Roberto Ierusalimschy
95ed6c1127
better(?) scheme for cleaning weak tables; all ressurected objects
are removed from weak values before finalization
13 years ago
Roberto Ierusalimschy
45c346645c
avoid clearing ephemeron tables that have nothing to be cleaned
(no white elements)
13 years ago
Roberto Ierusalimschy
74b0bb3a45
macro 'checkconsistency' moved to this file, as it is used only
here
14 years ago
Roberto Ierusalimschy
868ff40339
full collection does not restart collector + avoid changing GC
state if an error happens in a step
14 years ago