aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lgc.c3
-rw-r--r--manual/manual.of14
2 files changed, 10 insertions, 7 deletions
diff --git a/lgc.c b/lgc.c
index d1f5590e..700390d2 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1055,7 +1055,6 @@ static void setpause (global_State *g) {
1055 l_obj threshold = applygcparam(g, PAUSE, g->marked); 1055 l_obj threshold = applygcparam(g, PAUSE, g->marked);
1056 l_obj debt = threshold - gettotalobjs(g); 1056 l_obj debt = threshold - gettotalobjs(g);
1057 if (debt < 0) debt = 0; 1057 if (debt < 0) debt = 0;
1058//printf("pause: %ld %ld\n", debt, g->marked);
1059 luaE_setdebt(g, debt); 1058 luaE_setdebt(g, debt);
1060} 1059}
1061 1060
@@ -1261,7 +1260,6 @@ static void minor2inc (lua_State *L, global_State *g, int kind) {
1261static int checkminormajor (global_State *g, l_obj addedold1) { 1260static int checkminormajor (global_State *g, l_obj addedold1) {
1262 l_obj step = applygcparam(g, MINORMUL, g->GCmajorminor); 1261 l_obj step = applygcparam(g, MINORMUL, g->GCmajorminor);
1263 l_obj limit = applygcparam(g, MINORMAJOR, g->GCmajorminor); 1262 l_obj limit = applygcparam(g, MINORMAJOR, g->GCmajorminor);
1264//printf("-> (%ld) major? marked: %ld limit: %ld step: %ld addedold1: %ld)\n", gettotalobjs(g), g->marked, limit, step, addedold1);
1265 return (addedold1 >= (step >> 1) || g->marked >= limit); 1263 return (addedold1 >= (step >> 1) || g->marked >= limit);
1266} 1264}
1267 1265
@@ -1410,7 +1408,6 @@ static int checkmajorminor (lua_State *L, global_State *g) {
1410 l_obj addedobjs = numobjs - g->GCmajorminor; 1408 l_obj addedobjs = numobjs - g->GCmajorminor;
1411 l_obj limit = applygcparam(g, MAJORMINOR, addedobjs); 1409 l_obj limit = applygcparam(g, MAJORMINOR, addedobjs);
1412 l_obj tobecollected = numobjs - g->marked; 1410 l_obj tobecollected = numobjs - g->marked;
1413//printf("(%ld) -> minor? tobecollected: %ld limit: %ld\n", numobjs, tobecollected, limit);
1414 if (tobecollected > limit) { 1411 if (tobecollected > limit) {
1415 atomic2gen(L, g); /* return to generational mode */ 1412 atomic2gen(L, g); /* return to generational mode */
1416 setminordebt(g); 1413 setminordebt(g);
diff --git a/manual/manual.of b/manual/manual.of
index 3181549d..7df32fcf 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -3672,12 +3672,13 @@ will contain the chunk until everything created by the chunk has
3672been collected; 3672been collected;
3673therefore, Lua can avoid copying to internal structures 3673therefore, Lua can avoid copying to internal structures
3674some parts of the chunk. 3674some parts of the chunk.
3675(In general, a fixed buffer would keep the chunk 3675(In general, a fixed buffer would keep its contents
3676as its contents until the end of the program, 3676until the end of the program,
3677for instance with the chunk in ROM.) 3677for instance with the chunk in ROM.)
3678Moreover, for a fixed buffer, 3678Moreover, for a fixed buffer,
3679the reader function should return the entire chunk in the first read. 3679the reader function should return the entire chunk in the first read.
3680(As an example, @Lid{luaL_loadbufferx} does that.) 3680(As an example, @Lid{luaL_loadbufferx} does that,
3681which means that you can use it to load fixed buffers.)
3681 3682
3682The function @Lid{lua_load} fully preserves the Lua stack 3683The function @Lid{lua_load} fully preserves the Lua stack
3683through the calls to the reader function, 3684through the calls to the reader function,
@@ -3936,7 +3937,7 @@ This function is equivalent to @Lid{lua_pushcclosure} with no upvalues.
3936 3937
3937Creates an @emphx{external string}, 3938Creates an @emphx{external string},
3938that is, a string that uses memory not managed by Lua. 3939that is, a string that uses memory not managed by Lua.
3939The pointer @id{s} points to the exernal buffer 3940The pointer @id{s} points to the external buffer
3940holding the string content, 3941holding the string content,
3941and @id{len} is the length of the string. 3942and @id{len} is the length of the string.
3942The string should have a zero at its end, 3943The string should have a zero at its end,
@@ -9362,6 +9363,11 @@ it is equivalent to @Lid{lua_closethread} with
9362} 9363}
9363 9364
9364@item{ 9365@item{
9366The function @id{lua_setcstacklimit} is deprecated.
9367Calls to it can simply be removed.
9368}
9369
9370@item{
9365The function @Lid{lua_dump} changed the way it keeps the stack 9371The function @Lid{lua_dump} changed the way it keeps the stack
9366through the calls to the writer function. 9372through the calls to the writer function.
9367(That was not specified in previous versions.) 9373(That was not specified in previous versions.)