Mercurial > hg > audiodb
diff audioDB.cpp @ 313:f9dde18f556a
Check for index-exists on WS --load_index and exit if it does not. Revert unmap_tables because cleanup() did it fine, but there is a memory leak in ws_query calls.
author | mas01mc |
---|---|
date | Sat, 09 Aug 2008 15:46:42 +0000 |
parents | 00cb98315f8c |
children | b671a46873c2 |
line wrap: on
line diff
--- a/audioDB.cpp Sat Aug 09 15:17:01 2008 +0000 +++ b/audioDB.cpp Sat Aug 09 15:46:42 2008 +0000 @@ -88,7 +88,6 @@ processArgs(argc, argv); assert(O2_ACTION(COM_QUERY)); query(dbName, inFile, adbQueryResponse); - unmap_tables(); } catch(char *err) { cleanup(); throw(err); @@ -108,25 +107,6 @@ } } -void audioDB::unmap_tables(){ - if(indata) - munmap(indata,statbuf.st_size); - if(db) - munmap(db,getpagesize()); - if(fileTable) - munmap(fileTable, fileTableLength); - if(trackTable) - munmap(trackTable, trackTableLength); - if(dataBuf) - munmap(dataBuf, dataBufLength); - if(timesTable) - munmap(timesTable, timesTableLength); - if(l2normTable) - munmap(l2normTable, l2normTableLength); - if(trackOffsetTable) - delete trackOffsetTable; -} - void audioDB::cleanup() { cmdline_parser_free(&args_info); if(indata)