failed open of server socket consumes memory

  • Dr. Martin Lehr

    Dr. Martin Lehr - 2007-04-18

    Recently I had to write a background program which checks whether a dicom sercive is still running or not.
    So I had the idea: Trying to open this dicom port as a server socket. If this fails, the dicom service is still running.
    Thereby I observed that the failed opening of a server socket consumes memory.

    One failed opening costs about 2100 bytes.

    Tested OS versions, GT.M versions:
    GT.M 5.1-000, GT.M 4.2-002
    Suse Linux 10.1 Kernel 2.6.16, Suse Linux 9.1 Kernel 2.6.4, Suse Linux 8.0 Kernel 2.4.18
    The following programm demonstrates the memory consumtion.
    The port should be set to a port which is already used by a service.

    Regards, Martin

    S PORT=2049
    S SCK="SCK$"_$J
    S TRY=0
    S TRY=TRY+1
    I $T W !,"please choose a port which is in use" C SCK G END
    W TRY,!
    ZSY "ps -p "_$J_" -o pid,rss"
    R *X:0 I $T G END
    G LOOP

    • Narayanan S Rajamani


      Thanks for reporting this. It is indeed an issue in GT.M which will be fixed in a future release of GT.M. The tracking # S9H04-002654 has been created.



Log in to post a comment.