aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of92
1 files changed, 61 insertions, 31 deletions
diff --git a/manual/manual.of b/manual/manual.of
index e6a3cd9e..92d408e5 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -681,12 +681,10 @@ effectively producing a non-incremental, stop-the-world collector.
681The garbage-collector step size controls the 681The garbage-collector step size controls the
682size of each incremental step, 682size of each incremental step,
683specifically how many objects the interpreter creates 683specifically how many objects the interpreter creates
684before performing a step. 684before performing a step:
685This parameter is logarithmic: 685A value of @M{n} means the interpreter will create
686A value of @M{n} means the interpreter will create @M{2@sp{n}} 686approximately @M{n} objects between steps.
687objects between steps. 687The default value is 250.
688The default value is 8,
689which means steps of approximately @N{256 objects}.
690 688
691} 689}
692 690
@@ -728,11 +726,13 @@ The default value is 100.
728The major-minor multiplier controls the shift back to minor collections. 726The major-minor multiplier controls the shift back to minor collections.
729For a multiplier @M{x}, 727For a multiplier @M{x},
730the collector will shift back to minor collections 728the collector will shift back to minor collections
731after a major collection collects at least @M{x%} of the allocated objects. 729after a major collection collects at least @M{x%}
730of the objects allocated during the last cycle.
731
732In particular, for a multiplier of 0, 732In particular, for a multiplier of 0,
733the collector will immediately shift back to minor collections 733the collector will immediately shift back to minor collections
734after doing one cycle of major collections. 734after doing one cycle of major collections.
735The default value is 20. 735The default value is 80.
736 736
737} 737}
738 738
@@ -3336,19 +3336,32 @@ Returns a boolean that tells whether the collector is running
3336(i.e., not stopped). 3336(i.e., not stopped).
3337} 3337}
3338 3338
3339@item{@defid{LUA_GCINC} (int pause, int stepmul, int stepsize)| 3339@item{@defid{LUA_GCINC}|
3340Changes the collector to incremental mode 3340Changes the collector to incremental mode.
3341with the given parameters @see{incmode}.
3342Returns the previous mode (@id{LUA_GCGEN} or @id{LUA_GCINC}). 3341Returns the previous mode (@id{LUA_GCGEN} or @id{LUA_GCINC}).
3343} 3342}
3344 3343
3345@item{@defid{LUA_GCGEN} (int minormul, int minormajor, int majorminor)| 3344@item{@defid{LUA_GCGEN}|
3346Changes the collector to generational mode 3345Changes the collector to generational mode.
3347with the given parameters @see{genmode}.
3348Returns the previous mode (@id{LUA_GCGEN} or @id{LUA_GCINC}). 3346Returns the previous mode (@id{LUA_GCGEN} or @id{LUA_GCINC}).
3349} 3347}
3350 3348
3349@item{@defid{LUA_GCSETPARAM} (int param, int value)|
3350Changes the values of a parameter of the collector and returns
3351the previous value of that parameter.
3352The argument @id{param} must have one of the following values:
3353@description{
3354@item{@defid{LUA_GCPMINORMUL}| The minor multiplier. }
3355@item{@defid{LUA_GCPMAJORMINOR}| The major-minor multiplier. }
3356@item{@defid{LUA_GCPMINORMAJOR}| The minor-major multiplier. }
3357@item{@defid{LUA_GCPPAUSE}| The garbage-collector pause. }
3358@item{@defid{LUA_GCPSTEPMUL}| The step multiplier. }
3359@item{@defid{LUA_GCPSTEPSIZE}| The step size. }
3360}
3361}
3362
3351} 3363}
3364
3352For more details about these options, 3365For more details about these options,
3353see @Lid{collectgarbage}. 3366see @Lid{collectgarbage}.
3354 3367
@@ -6347,20 +6360,35 @@ Returns a boolean that tells whether the collector is running
6347} 6360}
6348 6361
6349@item{@St{incremental}| 6362@item{@St{incremental}|
6350Change the collector mode to incremental. 6363Changes the collector mode to incremental and returns the previous mode.
6351This option can be followed by three numbers:
6352the garbage-collector pause,
6353the step multiplier,
6354and the step size @see{incmode}.
6355A -1 or absent value means to not change that value.
6356} 6364}
6357 6365
6358@item{@St{generational}| 6366@item{@St{generational}|
6359Change the collector mode to generational. 6367Changes the collector mode to generational and returns the previous mode.
6360This option can be followed by three numbers: 6368}
6361the garbage-collector minor multiplier, 6369
6362the minor-major multiplier, and the major-minor multiplier @see{genmode}. 6370@item{@St{setparam}|
6363A -1 or absent value means to not change that value. 6371Changes the values of a parameter of the collector and returns
6372the previous value of that parameter.
6373This option must be followed by two extra arguments:
6374The name of the parameter being changed (a string)
6375and the new value for that parameter (an integer).
6376The argument @id{param} must have one of the following values:
6377@description{
6378@item{@St{minormul}| The minor multiplier. }
6379@item{@St{majorminor}| The major-minor multiplier. }
6380@item{@St{minormajor}| The minor-major multiplier. }
6381@item{@St{pause}| The garbage-collector pause. }
6382@item{@St{stepmul}| The step multiplier. }
6383@item{@St{stepsize}| The step size. }
6384}
6385To be able to divide by 100
6386(as most parameters are given as percentages)
6387without using floating-point arithmetic,
6388Lua stores these parameters encoded.
6389This encoding approximates the real value;
6390so, the value returned as the previous value may not be
6391equal to the last value set.
6364} 6392}
6365 6393
6366} 6394}
@@ -9249,9 +9277,10 @@ declare a local variable with the same name in the loop body.
9249@itemize{ 9277@itemize{
9250 9278
9251@item{ 9279@item{
9252There were several changes in the parameters 9280Parameters for the garbage collection are not set
9253for the options @St{incremental} and @St{generational} 9281with the options @St{incremental} and @St{generational};
9254of the function @Lid{collectgarbage}. 9282instead, there is a new option @St{setparam} to that end.
9283Moreover, there were some changes in the parameters themselves.
9255} 9284}
9256 9285
9257} 9286}
@@ -9277,9 +9306,10 @@ to signal the end of the dump.
9277} 9306}
9278 9307
9279@item{ 9308@item{
9280There were several changes in the parameters 9309Parameters for the garbage collection are not set
9281for the options @Lid{LUA_GCINC} and @Lid{LUA_GCGEN} 9310with the options @Lid{LUA_GCINC} and @Lid{LUA_GCGEN};
9282of the function @Lid{lua_gc}. 9311instead, there is a new option @Lid{LUA_GCSETPARAM} to that end.
9312Moreover, there were some changes in the parameters themselves.
9283} 9313}
9284 9314
9285} 9315}