I have a similar problem, too.
I write a https server using openssl.
When a new browser window is opened and client_key_exchange is processed,
my https server will lose memories.
I have no idea about the memory problem up to now.
I wonder whether you have fixed the problem.
Could you tell me what you do about the problem?
Thanks a lot.
wilson shao
mailto:[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Kim Carter
Sent: Saturday, December 21, 2002 12:02 AM
To: [EMAIL PROTECTED]
Subject: Why does get_https do not free memory used
Platform: UNIX, solaris, PERL 5.6.1, Net::SSLeay-1.18, OpenSSL 0.9.6e
I have written code to make a https call to a secure server that also
requires user authentication. Using the Net::SSLeay::get_https
function,
see code below. A request is made to retrieve a large document. Once
the file is successfully downloaded, I execute the UNIX check sum
command (cksum filename) to validate the transfer. The check sum fails
with the error "not enough space". I monitored the script using the
top
command and noticed the memory used by the get_https function does not
get freed until the calling program is terminated; resulting in not
enough memory to run the cksum command that follows. Before my script is
executed, I have 527M of free
memory. When the download is completed, I have less than a MEG free.
Is this the correct behavior of the function ? Is there a way to free
the memory used by the function after a request is completed?
I also noticed once the function obtains the memory needed, I can make
additional request for document download (for loop) and it does not use
any additional memory. The problem is I don't have enough memory to
execute any UNIX command after the get_https function is invoked .
Any help or explanation is appreciated.
Thanks.
Kim Carter
Code:
#!/usr/local/bin/perl -w
use strict;
use HTTP::Request;
use Net::SSLeay qw(get_https);
use HTTP::Headers;
my $h = new HTTP::Headers;
$h->authorization_basic("id","passwd");
($page, $results, %headers) =
get_https("hostname.com", 443,
"/filename.bin", $h->as_string());
open F, ">newfile";
print F $page;
close F;
undef($page); undef($results);
undef(%headers);
open(CK, "/usr/bin/cksum newfile |") or
warn "can't perform
checksum $!\n";
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]:I"Ϯrm
(Z+K+1xh[z(Z+fyfh)z{,