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: arnold
Subject: Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4
Date: Tue, 13 Aug 2019 12:08:22 -0600
User-agent: Heirloom mailx 12.5 7/5/10

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]