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
Roberto Ierusalimschy
551b076f1c
change in the relationship between totalbytes and GCdebt - luaM_realloc_
is too critical to update two counters
14 years ago
Roberto Ierusalimschy
737f119187
better control for GC running or stopped
14 years ago
Roberto Ierusalimschy
350cc4bcb6
'micro' bug: when closing state, old objects are finalized (breaking
assertion)
14 years ago
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
14 years ago
Roberto Ierusalimschy
4590a89b32
corrected warnings from different compilers (mostly casts and small
details)
14 years ago
Roberto Ierusalimschy
6828f6d427
new parameter 'majorinc' to control frequency of major collections
in generational mode
14 years ago
Roberto Ierusalimschy
a71c5f6f53
typo in comments
15 years ago
Roberto Ierusalimschy
d9ea6eca7c
macro 'key2tal' replaced by 'gkey' (as both were equal)
15 years ago
Roberto Ierusalimschy
fabe4ec487
better barrier for prototypes
15 years ago
Roberto Ierusalimschy
575074fd85
Lua closures are cached for reuse
15 years ago
Roberto Ierusalimschy
e94fac8956
bug: generational collection was not running collector! (must write
a test for this...)
15 years ago
Roberto Ierusalimschy
3d45a8eb1c
really stop collection during finalizers
15 years ago
Roberto Ierusalimschy
4fd76b8148
avoid "strong" cast
15 years ago
Roberto Ierusalimschy
1c1a98e872
corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
15 years ago
Roberto Ierusalimschy
c006f085d9
new macro 'resetoldbit'
15 years ago
Roberto Ierusalimschy
de97177744
avoid 'else assert' (which may result in an empty else)
15 years ago
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')
15 years ago
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)
15 years ago
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)
15 years ago
Roberto Ierusalimschy
7444b5a1d5
better documentation of GC costs
15 years ago
Roberto Ierusalimschy
3e662cec89
full GC must run finalizers only after finishing everything else
(including a return to generational mode if needed)
15 years ago