#1077: Removed msync() calls from MemIo.

v0.27.3
Andreas Huggel 10 years ago
parent fdb33b467b
commit b030a4de7c

@ -702,7 +702,6 @@ namespace Exiv2 {
*/ */
virtual byte* mmap(bool /*isWriteable*/ =false); virtual byte* mmap(bool /*isWriteable*/ =false);
virtual int munmap(); virtual int munmap();
int msync();
//@} //@}
//! @name Accessors //! @name Accessors

@ -1174,7 +1174,6 @@ namespace Exiv2 {
MemIo::~MemIo() MemIo::~MemIo()
{ {
if (p_->isMalloced_) { if (p_->isMalloced_) {
msync();
std::free(p_->data_); std::free(p_->data_);
} }
delete p_; delete p_;
@ -1200,7 +1199,6 @@ namespace Exiv2 {
if (memIo) { if (memIo) {
// Optimization if src is another instance of MemIo // Optimization if src is another instance of MemIo
if (p_->isMalloced_) { if (p_->isMalloced_) {
msync();
std::free(p_->data_); std::free(p_->data_);
} }
p_->idx_ = 0; p_->idx_ = 0;
@ -1288,16 +1286,7 @@ namespace Exiv2 {
int MemIo::munmap() int MemIo::munmap()
{ {
return msync();
}
int MemIo::msync()
{
#ifdef MS_SYNC
return ::msync(p_, p_->size_, MS_SYNC);
#else
return 0; return 0;
#endif
} }
long MemIo::tell() const long MemIo::tell() const

Loading…
Cancel
Save