Roberto Ierusalimschy
dcc070683c
avoid reserving LUA_RIDX_LAST slots in any table used by reference
system. Store free list in a field indexed by a unique name,
instead of using a numerical index.
15 years ago
Roberto Ierusalimschy
2d81cfa4e1
corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX
anymore)
15 years ago
Roberto Ierusalimschy
0bccf03d7e
slightly better definition for 'changenvalue'
15 years ago
Roberto Ierusalimschy
ad2b5decc8
'lua_assert' can be empty when assertions are off
15 years ago
Roberto Ierusalimschy
32c1764b5d
slightly better definition for 'isgray'
15 years ago
Roberto Ierusalimschy
de97177744
avoid 'else assert' (which may result in an empty else)
15 years ago
Roberto Ierusalimschy
fa2ddb070a
details (to avoid too long strings in assertions)
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
8e1bdda66a
stupid bug when calling 'luaC_changemode' (in function lua_gc)
15 years ago
Roberto Ierusalimschy
9c1347e647
more tests in 'lua_checkmemory' + more information in function
'gccolor'
15 years ago
Roberto Ierusalimschy
b373a40133
new macro 'isgenerational' + new macro 'isold' + better deffinition
for 'isdead', compatible with the code used by 'sweeplist'
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
a4f20e3c8b
comments
15 years ago
Roberto Ierusalimschy
8c583c61a3
more tests in 'lua_checkmemory'
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
d77898597e
new function 'luaC_changemode'
15 years ago
Roberto Ierusalimschy
237f755dca
typos in comments
15 years ago
Roberto Ierusalimschy
7444b5a1d5
better documentation of GC costs
15 years ago
Roberto Ierusalimschy
e7ce7e1850
changes in patch to monitor garbage collection
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
Roberto Ierusalimschy
fde866e303
details (comments)
15 years ago
Roberto Ierusalimschy
2d7a81a204
missing parentheses in declaration
15 years ago
Roberto Ierusalimschy
658ea8752b
no need to handle '\0' differently from other control chars in
format '%q'
15 years ago
Roberto Ierusalimschy
aa73403ba4
no need of a KGC_FORCED collection kind; it has the same behavior of
a normal collection
15 years ago
Roberto Ierusalimschy
0c27de2e7b
no more 'finalize' phase in GC; finalizers are called along the
entire cycle
15 years ago
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).
15 years ago
Roberto Ierusalimschy
85555646e3
invariant must be kept in atomic 'phase' too
15 years ago
Roberto Ierusalimschy
4d871ee973
"gray lists" only need to be valid when 'keepinvariant' is true
15 years ago
Roberto Ierusalimschy
b9e1dec2cb
added comment explaining a bit about the invariants of the collector
15 years ago
Roberto Ierusalimschy
dc2b8a0073
detail
15 years ago
Roberto Ierusalimschy
9a9fe42deb
wrong comment
15 years ago
Roberto Ierusalimschy
0062db1e06
default PAUSE should be 200 (differences may be corrected in
internal multiplers)
+ check for unbilt stack equal the one used by lgc.c
15 years ago
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.
15 years ago
Roberto Ierusalimschy
5d79c6684b
removed commented-out debugging code
15 years ago
Roberto Ierusalimschy
3410dcd375
new way to control GC speed
15 years ago
Roberto Ierusalimschy
5a7a0c72d8
'luaC_linkupval' embedded into call site
15 years ago
Roberto Ierusalimschy
ee7478e884
improved 'lua_checkmemory', with better control over gray objects
15 years ago
Roberto Ierusalimschy
aaa5d7adab
'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed
15 years ago
Roberto Ierusalimschy
3eb1788bb4
new way to control GC speed (keeping a 'debt' counter)
15 years ago
Roberto Ierusalimschy
00114a95b2
lots of new comments + small changes in loop controls + other small
"janitor work"
15 years ago
Roberto Ierusalimschy
4aaf0ef75c
"to-be-finalized" objects marked and sweeped like all other objects
15 years ago
Roberto Ierusalimschy
ed720d09f3
upvalue barriers for Lua functions must act on the upvalue itself,
not on its closure
15 years ago
Roberto Ierusalimschy
376e939ef6
missing parentheses around 'luaL_pushresultsize' declaration
15 years ago
Roberto Ierusalimschy
9d28e2b3e5
bug with io.read(op, "*n")
15 years ago
Roberto Ierusalimschy
49ca1f7083
allows thread switches (when/if there are thread switches) in the same
places that finalizers can run (so they should be safe...)
15 years ago
Roberto Ierusalimschy
4db6f20770
ensure that 'luai_userstatethread' is always called (even if
'stack_init' throws a memory error)
15 years ago
Roberto Ierusalimschy
cca71912e6
'gcinfo' was deprecated in version 5.0.
15 years ago
Roberto Ierusalimschy
8003e9544d
'string.format' may get buffer as an argument when there are
missing arguments and format string is too long
15 years ago
Roberto Ierusalimschy
973d81efb3
complete control over number of each kind of object allocated
15 years ago
Roberto Ierusalimschy
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an
upvalue.
15 years ago