bug-gnulib
[Top][All Lists]
Advanced

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

Re: reclaiming memory before exit


From: Jeffrey Walton
Subject: Re: reclaiming memory before exit
Date: Fri, 15 May 2020 16:17:47 -0400

On Fri, May 15, 2020 at 3:58 PM Bruno Haible <address@hidden> wrote:
>
> Kamil Dudka wrote:
> > How old is the text in GNU standards that Bruno refers to?
>
> How old it is, is irrelevant because the two main points are valid and will
> continue to be valid (if the tools don't change):
>
>   1) The sentence "if memory is used until just before a process exits,
>      don’t free it simply to silence such a tool" [1] is valid as long
>      as GNU targets not an embedded OS for a hardware without MMU, but
>      an operation system that frees all resources of a process when the
>      process exits.

The use case is incomplete. It does not cover libraries.

Just ask the OpenJDK guys about libraries like Ncurses and OpenSSL.
They were discussing library problems on the OpenSSL mailing list in
the past.

You see, the application will remain loaded, but Java (and other
languages like .Net) will load the shared objects multiple times as
functions are needed (and then unload the shared object when the call
is done).

The subsequent accumulated memory leak eventually crashes the app or device.

Jeff



reply via email to

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