bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk


From: Finn Magnusson
Subject: Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4
Date: Thu, 15 Aug 2019 12:30:03 +0000 (UTC)

 Thank you ! I could now apply the patch and it fixed the memory leak issue !
Thank you for the great support :-)
Best regards
Finn

    On Thursday, August 15, 2019, 8:30:36 AM GMT+2, address@hidden 
<address@hidden> wrote:  
 
 Using

    patch -p1 < the-patch-file

should have worked. If not, you can simply manually edit builtin.c
and add the bracketing C preprocessor control lines.

Thanks,

Arnold

Finn Magnusson <address@hidden> wrote:

>  Hi !
> Thank you for the patch and for the tip about the pipe , will correct our 
> code accordingly.Regarding the patch, I tried to run it on gawk-5.0.1 but it 
> did not seem to run, see below. 
> Did I miss something or should I run it on a different gawk version?
> seliius01071 [20:16] [eanzmagn/gawk501/gawk-5.0.1] -> patch -p1 -i 
> arnold.patch 
> patching file builtin.c
> Hunk #1 FAILED at 1647.
> 1 out of 1 hunk FAILED -- saving rejects to file builtin.c.rej
> seliius01071 [20:16] [eanzmagn/gawk501/gawk-5.0.1] -> cat arnold.patch 
> diff --git a/builtin.c b/builtin.c
> index 1c205aa..0ddfb32 100644
> --- a/builtin.c
> +++ b/builtin.c
> @@ -1647,8 +1647,10 @@ mpf1:
>     }
>     bchunk(s0, s1 - s0);
>     olen_final = obufout - obuf;
> +#if 0
>     if (ofre > 0)
>         erealloc(obuf, char *, olen_final + 1, "format_tree");
> +#endif
>     r = make_str_node(obuf, olen_final, ALREADY_MALLOCED);
>     obuf = NULL;
>
>  seliius01071 [20:17] [eanzmagn/gawk501/gawk-5.0.1] -> cat builtin.c.rej 
> --- builtin.c
> +++ builtin.c
> @@ -1647,8 +1647,10 @@
>     }
>     bchunk(s0, s1 - s0);
>     olen_final = obufout - obuf;
> +#if 0
>     if (ofre > 0)
>         erealloc(obuf, char *, olen_final + 1, "format_tree");
> +#endif
>     r = make_str_node(obuf, olen_final, ALREADY_MALLOCED);
>     obuf = NULL;
> seliius01071 [20:18] [eanzmagn/gawk501/gawk-5.0.1] -> 
>
>  
>
>
>
> Thank youFinn
>
>
>    On Tuesday, August 13, 2019, 8:08:29 PM GMT+2, address@hidden 
><address@hidden> wrote:  
>  
>  Hi.
>
> Finn Magnusson via bug-gawk <address@hidden> wrote:
>
> > Dear gawk developers
> >
> > Our team recently started using gawk 5.0.1 and found that the RAM memory
> > usage seems to have increased compared to gawk version 4.1.4, which we
> > were using before.
>
> The patch below seems to fix the problem.  I am not sure why.
> I will continue to investigate, but in the meantime I think this will
> get you going. Please let me know.
>
> By the way, your test program uses `|&' which opens a two-way pipe
> to the subprocess. However, all you're doing is reading from it, so
> it's enough to just use `|'.
>
> Thanks,
>
> Arnold
> ------------------------------------------------------------
> diff --git a/builtin.c b/builtin.c
> index 1c205aa..0ddfb32 100644
> --- a/builtin.c
> +++ b/builtin.c
> @@ -1647,8 +1647,10 @@ mpf1:
>      }
>      bchunk(s0, s1 - s0);
>      olen_final = obufout - obuf;
> +#if 0
>      if (ofre > 0)
>          erealloc(obuf, char *, olen_final + 1, "format_tree");
> +#endif
>      r = make_str_node(obuf, olen_final, ALREADY_MALLOCED);
>      obuf = NULL;
>  out:
>  
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]