aboutsummaryrefslogtreecommitdiff
path: root/testes/gc.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Better support in 'ltests' for tracing the GCRoberto Ierusalimschy2024-10-211-3/+3
|
* GC test was not restarting collector after pauseRoberto Ierusalimschy2024-06-181-1/+2
|
* New mechanism to query GC parametersRoberto Ierusalimschy2024-01-161-6/+8
|
* Several tweaks in the garbage collectorRoberto Ierusalimschy2023-12-271-1/+28
| | | | | | - back with step size in collectgarbage("step") - adjustments in defaults for some GC parameters - adjustments in 'luaO_codeparam'
* Removed compatibility option LUA_COMPAT_GCPARAMSRoberto Ierusalimschy2023-12-221-1/+1
| | | | | | The meaning of different GC parameters changed, so there is point in supporting old values for them. The new code simply ignores the parameters when changing the GC mode, so the incompatibility is small.
* New option "setparms" for 'collectgarbage'Roberto Ierusalimschy2023-12-221-4/+7
| | | | | | The generational mode also uses the parameters for the incremental mode in its major collections, so it should be easy to change those parameters without having to change the GC mode.
* Removed parameter in 'collectgarbage("step")'Roberto Ierusalimschy2023-12-011-41/+1
| | | | A call to 'collectgarbage("step")' always performs one GC basic step.
* Removed deprecated options in 'lua_gc'Roberto Ierusalimschy2023-11-301-7/+2
| | | | Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
* Auxiliary buffer uses external stringsRoberto Ierusalimschy2023-11-131-3/+0
| | | | | The buffer system from the auxiliary library reuses its buffer as external memory when closing long strings.
* Avoid excessive name pollution in test filesRoberto Ierusalimschy2022-12-281-19/+23
| | | | | Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
* Fix debug information about finalizersRoberto Ierusalimschy2021-12-141-1/+1
| | | | | | The flag CIST_FIN does not mark a finalizer, but the function that was running when the finalizer was called. (So, the function did not call the finalizer, but it looks that way in the stack.)
* Bug: GC is not reentrantRoberto Ierusalimschy2021-12-131-2/+4
| | | | As the GC is not reentrant, finalizers should not be able to invoke it.
* New control for reentrancy of emergency collectionsRoberto Ierusalimschy2021-02-261-0/+8
| | | | | | Instead of assuming that shrinking a block may be an emergency collection, use an explicit field ('gcstopem') to stop emergency collections while GC is working.
* Avoid memory allocation in some functions from 'ltests.c'Roberto Ierusalimschy2020-07-041-4/+4
| | | | | | | To allow their use in memory tests, some functions in 'ltests.c' should never allocate memory. To avoid this allocation, the library registers the strings used for status codes, and keeps the variable '_WARN' always defined (with false instead of nil).
* Comments (mosty typos)Roberto Ierusalimschy2019-12-301-1/+1
|
* Default for warnings changed to "off"Roberto Ierusalimschy2019-08-201-1/+1
| | | | | Warnings are mostly a tool to help developers (e.g., by showing hidden error messages); regular users usually don't need to see them.
* Improvement in warn-mode '@store' (for testing)Roberto Ierusalimschy2019-08-181-3/+3
| | | | | | When using warn-mode '@store', from the test library, the tests ensure not only that the expected warnings were issued, but also that there was no extra warnings.
* Added control messages to warningsRoberto Ierusalimschy2019-08-151-1/+7
| | | | | | | Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
* DetailsRoberto Ierusalimschy2019-07-181-15/+7
| | | | | | | - Macro 'checkliveness' (for debug) always uses 'L', to avoid warnings. - Some old 'while' changed to 'for' in 'testes/gc.lua'. - In 'testes/libs/makefile', do not make files depend on 'ltests.h', which may not even exist.
* Small optimizations in 'string.gsub'Roberto Ierusalimschy2019-04-111-1/+1
| | | | | | | | | | | Avoid creating extra strings when possible: - avoid creating new resulting string when subject was not modified (instead, return the subject itself); - avoid creating strings representing the captured substrings when handling replacements like '%1' (instead, add the substring directly to the buffer).
* Changes in the warning systemRoberto Ierusalimschy2019-03-141-4/+7
| | | | | | | | - The warning functions get an extra parameter that tells whether message is to be continued (instead of using end-of-lines as a signal). - The user data for the warning function is a regular value, instead of a writable slot inside the Lua state.
* After a "bad collections", avoid switching back back to generationalRoberto Ierusalimschy2019-01-301-0/+6
| | | | | | | After a major bad collection (one that collects too few objects), next collection will be major again. In that case, avoid switching back to generational mode (as it will have to switch again to incremental to do next major collection).
* No more LUA_ERRGCMM errorsRoberto Ierusalimschy2019-01-011-37/+50
| | | | | Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
* Added directory to test file names in '$Id:'Roberto Ierusalimschy2018-07-251-1/+1
| | | | | | | From the point of view of 'git', all names are relative to the root directory of the project. So, file names in '$Id:' also should be relative to that directory: the proper name for test file 'all.lua' is 'testes/all.lua'.
* Fixed bug in generational collection of userdataRoberto Ierusalimschy2018-07-131-2/+2
| | | | | | | | | During generational collection, a userdatum must become gray and go to a gray list after being traversed (like tables), so that 'correctgraylist' can handle it to its next stage. This commit also added minimum tests for the generational collector, including one that would detect this bug.
* Added manual and tests for version 5.4-w2Roberto Ierusalimschy2018-07-091-0/+661