aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-29 16:22:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-29 16:22:09 -0300
commit63d68bd657b7386c9c58b4439a100ea0ccbd633e (patch)
tree117ae53a7b1cbfd242370af0c5250fca85fd2a7d /lauxlib.c
parent011850a8f86f514d1ba2ebf7a9411c8036b917f4 (diff)
downloadlua-63d68bd657b7386c9c58b4439a100ea0ccbd633e.tar.gz
lua-63d68bd657b7386c9c58b4439a100ea0ccbd633e.tar.bz2
lua-63d68bd657b7386c9c58b4439a100ea0ccbd633e.zip
Comments detailing the ages for generational GC
Plus other comments and small details.
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 927e36f0..ab3c7c93 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1139,12 +1139,11 @@ static unsigned int luai_makeseed (void) {
1139 unsigned int res; 1139 unsigned int res;
1140 unsigned int i; 1140 unsigned int i;
1141 time_t t = time(NULL); 1141 time_t t = time(NULL);
1142 void *h = buff;
1143 char *b = (char*)buff; 1142 char *b = (char*)buff;
1144 addbuff(b, h); /* local variable's address */ 1143 addbuff(b, b); /* local variable's address */
1145 addbuff(b, t); /* time */ 1144 addbuff(b, t); /* time */
1146 /* fill (rare but possible) remain of the buffer with zeros */ 1145 /* fill (rare but possible) remain of the buffer with zeros */
1147 memset(b, 0, BUFSEED * sizeof(int) - BUFSEEDB); 1146 memset(b, 0, sizeof(buff) - BUFSEEDB);
1148 res = buff[0]; 1147 res = buff[0];
1149 for (i = 0; i < BUFSEED; i++) 1148 for (i = 0; i < BUFSEED; i++)
1150 res ^= (res >> 3) + (res << 7) + buff[i]; 1149 res ^= (res >> 3) + (res << 7) + buff[i];