mirror of
https://github.com/aria2/aria2.git
synced 2025-02-12 18:07:16 +00:00
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is defined. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
This commit is contained in:
parent
46636201c1
commit
148b1baf38
@ -1,3 +1,9 @@
|
||||
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
|
||||
defined.
|
||||
* src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
|
||||
|
||||
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Use erase+lower_bound+insert instead of sort.
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "Util.h"
|
||||
#include "a2io.h"
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
@ -52,7 +53,11 @@ SingleFileAllocationIterator::SingleFileAllocationIterator(BinaryStream* stream,
|
||||
|
||||
SingleFileAllocationIterator::~SingleFileAllocationIterator()
|
||||
{
|
||||
#ifdef HAVE_POSIX_MEMALIGN
|
||||
free(_buffer);
|
||||
#else
|
||||
delete [] _buffer;
|
||||
#endif // HAVE_POSIX_MEMALIGN
|
||||
}
|
||||
|
||||
void SingleFileAllocationIterator::init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user