diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-06 12:41:39 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-06 12:41:39 -0300 |
| commit | 1ec251e091302515e54aa81d965840a5de4be0a1 (patch) | |
| tree | 6383ca33c3ad46984b341c5c393fac9947d03bfd /ltable.c | |
| parent | 5894ca7b95d7fb05f1e93ee77e849a8d816d1c6d (diff) | |
| download | lua-1ec251e091302515e54aa81d965840a5de4be0a1.tar.gz lua-1ec251e091302515e54aa81d965840a5de4be0a1.tar.bz2 lua-1ec251e091302515e54aa81d965840a5de4be0a1.zip | |
Detail (debugging aid)
When compiling with option HARDMEMTESTS, every creation of a new key
in a table forces an emergency GC.
Diffstat (limited to 'ltable.c')
| -rw-r--r-- | ltable.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -910,6 +910,8 @@ static void luaH_newkey (lua_State *L, Table *t, const TValue *key, | |||
| 910 | newcheckedkey(t, key, value); /* insert key in grown table */ | 910 | newcheckedkey(t, key, value); /* insert key in grown table */ |
| 911 | } | 911 | } |
| 912 | luaC_barrierback(L, obj2gco(t), key); | 912 | luaC_barrierback(L, obj2gco(t), key); |
| 913 | /* for debugging only: any new key may force an emergency collection */ | ||
| 914 | condchangemem(L, (void)0, (void)0, 1); | ||
| 913 | } | 915 | } |
| 914 | } | 916 | } |
| 915 | 917 | ||
