aboutsummaryrefslogtreecommitdiff
path: root/lgc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* GC back to controling pace counting bytesRoberto Ierusalimschy2024-09-191-125/+182
| | | | Memory is the resource we want to save. Still to be reviewed again.
* Rename of fields in global state that control GCRoberto Ierusalimschy2024-09-061-14/+14
| | | | | All fields in the global state that control the pace of the garbage collector prefixed with 'GC'.
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-7/+7
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* DetailsRoberto Ierusalimschy2024-05-081-1/+1
| | | | | Corrections in comments and manual. Added note in the manual about local variables in the REPL.
* DetailsRoberto Ierusalimschy2024-03-281-3/+0
|
* Removed "bulk operations"Roberto Ierusalimschy2024-03-151-29/+7
| | | | Negligible performance gains don't justify extra complexity.
* Added "bulk operations" to arraysRoberto Ierusalimschy2024-03-151-17/+42
| | | | | A few operations on arrays can be performed "in bulk", treating all tags of a cell as a simple (or a few) word(s).
* Removed uses of LUA_NUMTAGSRoberto Ierusalimschy2024-01-131-1/+1
| | | | That constant was already deprecated (see commit 6aabf4b15e7).
* A few more tweaks in the garbage collectorRoberto Ierusalimschy2024-01-101-11/+12
|
* New option "setparms" for 'collectgarbage'Roberto Ierusalimschy2023-12-221-8/+8
| | | | | | 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.
* GC parameters encoded as floating-point bytesRoberto Ierusalimschy2023-12-201-9/+9
| | | | | This encoding brings more precision and a larger range for these parameters.
* Option 0 for step multiplier makes GC non-incrementalRoberto Ierusalimschy2023-12-201-23/+44
|
* Check minor->major made at the end of a minor cycleRoberto Ierusalimschy2023-12-071-60/+35
| | | | | It does not make sense to wait for another cycle to decide when much of the information about creation of old objects is already available.
* First criteria for shifts minor<->majorRoberto Ierusalimschy2023-12-071-26/+55
|
* Major collections done incrementallyRoberto Ierusalimschy2023-12-061-68/+73
| | | | | Major collections do not need to "stop the world". Still pending: criteria for shifts minor-major, shifts generational-incremental.
* Removed macro 'changeage'Roberto Ierusalimschy2023-12-011-12/+12
| | | | | It is simpler to use always 'setage'. The saving from 'changeage' is too irrelevant.
* Comments detailing the ages for generational GCRoberto Ierusalimschy2023-11-291-4/+7
| | | | Plus other comments and small details.
* External stringsRoberto Ierusalimschy2023-11-091-1/+3
| | | | Strings can use external buffers to store their contents.
* Towards external stringsRoberto Ierusalimschy2023-11-081-2/+2
| | | | Long strings have a pointer to string contents.
* Merge branch 'newarray' into nextversionRoberto Ierusalimschy2023-11-071-7/+18
|\
| * Merge branch 'master' into newarrayRoberto Ierusalimschy2023-11-031-8/+12
| |\
| * | Full implementation of new representation for arraysRoberto Ierusalimschy2023-11-031-4/+4
| | |
| * | Full abstraction for representation of array valuesRoberto Ierusalimschy2023-10-301-7/+18
| | |
* | | Merge branch 'master' into nextversionRoberto Ierusalimschy2023-08-231-6/+10
|\ \ \ | | |/ | |/|
| * | More disciplined use of 'getstr' and 'tsslen'Roberto Ierusalimschy2023-08-171-3/+5
| | | | | | | | | | | | | | | We may want to add other string variants in the future; this change documents better where the code may need to handle those variants.
| * | Thread stacks resized in the atomic phaseRoberto Ierusalimschy2023-07-131-3/+5
| | | | | | | | | | | | | | | | | | | | | Although stack resize can be a little expensive, it seems unusual to have too many threads needing resize during one GC cycle. On the other hand, the change allows full collections to skip the propagate phase, going straight from a pause to the atomic phase.
| * | Several functions turned 'static'Roberto Ierusalimschy2023-05-221-2/+2
| |/ | | | | | | | | Several functions that were already being used only inside their own file have been declared as 'static'.
* | Do not avoid major collections when GCdebt is zeroRoberto Ierusalimschy2022-12-291-5/+2
| | | | | | | | | | 'collectgarbage("step")' (without an argument) does not have any special meaning, it means "do a step with some default size".
* | Changed signal of GC debtRoberto Ierusalimschy2022-12-131-8/+8
| | | | | | | | Positive debts seems more natural then negative ones.
* | Revamp of GC parametersRoberto Ierusalimschy2022-12-131-9/+5
| | | | | | | | | | More uniformity when handling GC parameters + avoid divisions by 100 when applying them.
* | Merge branch 'master' into nextversionRoberto Ierusalimschy2022-12-121-2/+6
|\|
| * Reduce calls to 'luaC_step' when GC is stoppedRoberto Ierusalimschy2022-12-091-3/+6
| |
* | Simplification in handling of GC debtRoberto Ierusalimschy2022-12-061-7/+5
| | | | | | | | | | Each incremental step has always the same size (stepsize), and the debt for next step also is always the same.
* | Simpler control for major collectionsRoberto Ierusalimschy2022-11-291-120/+70
| |
* | Removed GC checks from function callsRoberto Ierusalimschy2022-11-241-1/+2
| | | | | | | | | | Function calls do not create new objects. (It may use memory with stack reallocation, but now that is irrelevant to the GC.)
* | 'l_mem' renamed to 'l_obj' to count objectsRoberto Ierusalimschy2022-11-231-25/+25
| |
* | First version of GC counting objects for controlRoberto Ierusalimschy2022-11-231-132/+121
| | | | | | | | Still needs to review generational mode.
* | Added a counter of the total number of existing objectsRoberto Ierusalimschy2022-11-031-0/+2
|/ | | | It may simplify the control of the garbage collector.
* Threads are created like other objectsRoberto Ierusalimschy2022-11-011-4/+10
| | | | | Using a version of 'luaC_newobj' that allows offsets (extra space before the object itself).
* Stack indices changed to union'sRoberto Ierusalimschy2022-10-291-10/+10
| | | | | That will allow to change pointers to offsets while reallocating the stack.
* Bug: set correct pause when (re)entering gen. collection.Roberto Ierusalimschy2022-08-231-32/+31
|
* Bug: finalizer calling exit can corrupt finalization orderRoberto Ierusalimschy2021-12-221-5/+5
| | | | | 'os.exit' can call lua_close again, separating new finalizers created after all previous finalizers were already separated.
* 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-4/+7
| | | | As the GC is not reentrant, finalizers should not be able to invoke it.
* New control for reentrancy of emergency collectionsRoberto Ierusalimschy2021-02-261-12/+24
| | | | | | 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.
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-1/+1
| | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth).
* Bug when growing a stackRoberto Ierusalimschy2020-11-081-2/+2
| | | | | | When a stack grows, its extra area can be in use, and it becomes part of the common area. So, the extra area must be kept correct all the times. (Bug introduced by commit 5aa36e894f5.)
* Fixed bug of keys removed from tables vs 'next'Roberto Ierusalimschy2020-10-141-9/+8
| | | | | | Fixed the bug that a key removed from a table might not be found again by 'next'. (This is needed to allow keys to be removed during a traversal.) This bug was introduced in commit 73ec04fc.
* DetailsRoberto Ierusalimschy2020-10-121-11/+19
| | | | | | | - After converting a generic GCObject to a specific type ('gco2*'), avoid using the original GCObject (to reduce aliasing). - Small corrections in comments in 'lopcodes.h' - Added tests about who calls __close metamethods
* No more field 'lua_State.stacksize'Roberto Ierusalimschy2020-10-121-3/+2
| | | | | | The stack size is derived from 'stack_last', when needed. Moreover, the handling of stack sizes is more consistent, always excluding the extra space except when allocating/deallocating the array.