lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Odd looking code in lmem.c
From
: Daurnimator <quae@
...
>
Date
: Thu, 26 Jun 2014 00:26:28 -0400
Today I was reading the lua source, and came across this code in lmem.c (
http://www.lua.org/source/5.2/lmem.c.html#luaM_realloc_
)
if (g->gcrunning) {
luaC_fullgc(L, 1); /* try to free some memory... */
Is that conditional accidentally reversed?
Why run the gc again ONLY if the gc is mid-run?
Wouldn't it make sense to run the gc if it's NOT already running?
Sorry if this is a stupid question >.<
Daurn.
Follow-Ups
:
Re: Odd looking code in lmem.c
,
Paige DePol
Prev by Date:
Re: String manipulation
Next by Date:
Re: How is the Lua manual made?
Previous by thread:
Re: String manipulation
Next by thread:
Re: Odd looking code in lmem.c
Index(es):
Date
Thread