gc_inhibit_torture definition twice?
Peter Dalgaard BSA
25 Oct 1999 11:03:22 +0200
Thomas Hoffmann <firstname.lastname@example.org> writes:
> I have a problem to understand the way gc_inhibit_torture is defined.
> In include/Defn.h it is declared as extern, using the __MAIN__ trick this leads to
> a definition in main/main.c.
> But in main/memory.c you define (and initialize) gc_inhibit_torture again:
> int gc_inhibit_torture = 1; /* gets set to zero after initialisations */
> Then, in e.g. unix/system.c immediately at the beginning of main() you initialize
> gc_inhibit_torture once more:
> int main(int ac, char **av)
> int value, ierr;
> char *p, msg;
> structRstart rstart;
> Rstart Rp = &rstart;
> gc_inhibit_torture = 1;
> Can anybody explain the reason for this implementation?
It's a debugging aid, something that got hacked in to scare up some
deep memory protection bugs. The only reason for that implementation is
most likely that my mind was on other things at the time....
I believe it predates the __MAIN__ trick, but nowadays it would seem
that one can safely lose the definition in memory.c.
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (email@example.com) FAX: (+45) 35327907
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org