From: ts Date: 2001-12-17T20:24:30+09:00 Subject: [ruby-talk:28752] Re: Constant loss of memory with Kernel::load in a loop >>>>> "J" == Jens Nissen writes: J> - in small amounts but constantly, after 2 days around 200 MB. Can you try this patch, it's against ruby-1.6.5 to see if it give better result pigeon% diff -u parse.y.old parse.y --- parse.y.old Mon Dec 17 12:15:40 2001 +++ parse.y Mon Dec 17 12:18:52 2001 @@ -2048,12 +2048,14 @@ VALUE file; int start; { + char *tmp = ALLOCA_N(char, strlen(f) + 1); lex_gets = rb_io_gets; lex_input = file; lex_pbeg = lex_p = lex_pend = 0; ruby_sourceline = start - 1; - return yycompile(strdup(f), start); + strcpy(tmp, f); + return yycompile(tmp, start); } static inline int pigeon% Guy Decoux