Changes codes

1) Changed codes about memory leak
   For memory leak, below codes are changed.
   * calls malloc_trim function
   * calls initializing NSS function, and adds configure
     option "--enable-nss-init".
     If libcurl is with NSS, s3fs initializes NSS manually.
     This initializing NSS is enabled by "--enable-nss-init"
     option at configure. if this option is specified, you
     need "nss-devel" package.
   * calls initializing libxml2(xmlInitParser).
   * BIO functions have memory leak, calls CRYPTO_free_ex_data.
   * changes cache structure.
   * changes cache out logic to LRU.
   * sets alignment for allcated memory in body data structure.
   * adds ssl session into share handle. and adds nosscache option.
   * deletes unused allocated memory.(bug)
   * changes defaule parallel count of head request in readdir
     (500->20)
   * fixes some bugs.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@482 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ggtakec@gmail.com
2013-09-14 21:50:39 +00:00
parent d45f4707ea
commit 42b74c9d2e
10 changed files with 756 additions and 336 deletions

View File

@ -202,7 +202,7 @@ void PageList::FreeList(fdpage_list_t& list)
PageList::PageList(size_t size, bool is_init)
{
Init(0, false);
Init(size, is_init);
}
PageList::~PageList()
@ -417,7 +417,6 @@ bool PageList::Serialize(CacheFileStat& file, bool is_output)
}
string oneline;
stringstream ssall(ptmp);
free(ptmp);
// init
Clear();
@ -425,6 +424,7 @@ bool PageList::Serialize(CacheFileStat& file, bool is_output)
// load(size)
if(!getline(ssall, oneline, '\n')){
DPRN("failed to parse stats.");
free(ptmp);
return false;
}
size_t total = static_cast<size_t>(atoi(oneline.c_str()));
@ -455,6 +455,7 @@ bool PageList::Serialize(CacheFileStat& file, bool is_output)
// add new area
SetInit(offset, size, is_init);
}
free(ptmp);
if(is_err){
DPRN("failed to parse stats.");
Clear();