Hi, I have a SSL enabled client application. This is a multi threaded application in which simultaneous client-server connect is achieved by spawning a thread for each connection. When the application is stressed by creating spawning about 100 threads and each thread would do a SSL connect to server sequentially ~1000 times.
I observe that the swap size in my Linux box(Fedora core 4 - 2.6.11.12 ) reduces to zero megabytes leading to application crash at times and kernel killing the process ( kernel: Out of Memory: Killed process ). The CTX object is created once for every thread. SSL object is freed after every connection[SSL_free(ssl);] BIO is set as follows: bio = BIO_new(BIO_s_socket()); BIO_set_fd(bio, sd, BIO_NOCLOSE); BIO_set_close(bio, BIO_NOCLOSE) ; SSL_set_bio(ssl,bio,bio); Any ideas why swap size reduces to zero. The application code thus far seems not to have leak. Its a thin client without much heap allocation. Should BIO_free needs to be called after every connection? I suppose SSL_free() takes care, isn't? Thanks, Prabhu. S