diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-29 16:22:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-29 16:22:09 -0300 |
commit | 63d68bd657b7386c9c58b4439a100ea0ccbd633e (patch) | |
tree | 117ae53a7b1cbfd242370af0c5250fca85fd2a7d /lauxlib.c | |
parent | 011850a8f86f514d1ba2ebf7a9411c8036b917f4 (diff) | |
download | lua-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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]; |