• memleak :)

    From Oleg Artemjev@2:5020/2141.808 to Gerrit Kuehn on Sun Apr 25 16:13:02 2021
    Hello, Gerrit Kuehn.
    On 4/16/21 8:44 AM you wrote:

    After +20 some odd years I have yet to see that happen.
    Just start an application that runs into a memory leak...

    --------cut memleak.c -------
    #define gigs = 8 // your gigabytes here
    #include <stdlib.h>
    int main() {
    long int i=0;
    while(i<1024*1024*1024*gigs/2) {
    void *nofree = malloc(++i);
    }
    return 0;
    }
    ---------cut-------

    Try this w/ gcc -o memleak memleak.c; ./memleak

    No free() after malloc() should give memory leak, isn't it?

    --
    Best regards!
    Posted using Hotdoged on Android
    --- Hotdoged/2.13.5/Android
    * Origin: Android device, Milky Way (2:5020/2141.808)
  • From Benny Pedersen@2:230/0 to Oleg Artemjev on Thu Apr 29 15:35:54 2021
    Hello Oleg!

    25 Apr 2021 16:13, Oleg Artemjev wrote to Gerrit Kuehn:

    Try this w/ gcc -o memleak memleak.c; ./memleak

    No free() after malloc() should give memory leak, isn't it?

    postgresql have problems aswell, imho when issue swapoff then top should not show that its still using swap filesystem for that threads in top, if this happens its imho sign of kernel problem, or really mem leak


    Regards Benny

    ... too late to die young :)

    --- Msged/LNX 6.1.2 (Linux/5.10.27-gentoo-dist (x86_64))
    * Origin: I will always keep a PC running CPM 3.0 (2:230/0)
  • From Karel Kral@2:423/39 to Benny Pedersen on Thu Apr 29 20:02:00 2021
    Hello Benny!

    29 Apr 21 15:35, you wrote to Oleg Artemjev:

    postgresql have problems aswell, imho when issue swapoff then top
    should not show that its still using swap filesystem for that threads
    in top, if this happens its imho sign of kernel problem, or really mem leak

    You can take nearly any JAVA app. Java heap usualy exhausted...

    Karel

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Plast DATA (2:423/39)
  • From Benny Pedersen@2:230/0 to Karel Kral on Fri Apr 30 22:07:38 2021
    Hello Karel!

    29 Apr 2021 20:02, Karel Kral wrote to Benny Pedersen:

    You can take nearly any JAVA app. Java heap usualy exhausted...

    never needed java, but getjar apps to my nokie e51 worked :)


    Regards Benny

    ... too late to die young :)

    --- Msged/LNX 6.1.2 (Linux/5.10.27-gentoo-dist (x86_64))
    * Origin: I will always keep a PC running CPM 3.0 (2:230/0)