diff options
author | flz <flz@FreeBSD.org> | 2010-02-23 02:36:55 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2010-02-23 02:36:55 +0800 |
commit | 727665e44a637f8e79e0aabc8cd7bdbff29515d5 (patch) | |
tree | 56af9b6522b8e91acbc521a29838e02375088ccd /net-p2p/libtorrent-devel | |
parent | 51e38fb4cc074a5b18482b50f1649bb920ecb116 (diff) | |
download | freebsd-ports-gnome-727665e44a637f8e79e0aabc8cd7bdbff29515d5.tar.gz freebsd-ports-gnome-727665e44a637f8e79e0aabc8cd7bdbff29515d5.tar.zst freebsd-ports-gnome-727665e44a637f8e79e0aabc8cd7bdbff29515d5.zip |
Add local patch to release memory more efficiently.
Submitted by: Thomas Burgess
Feature safe: yes
Diffstat (limited to 'net-p2p/libtorrent-devel')
-rw-r--r-- | net-p2p/libtorrent-devel/Makefile | 2 | ||||
-rw-r--r-- | net-p2p/libtorrent-devel/files/patch-src_data_memory__chunk.cc | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/net-p2p/libtorrent-devel/Makefile b/net-p2p/libtorrent-devel/Makefile index e03155bc756e..db60a028aa31 100644 --- a/net-p2p/libtorrent-devel/Makefile +++ b/net-p2p/libtorrent-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= libtorrent-devel PORTVERSION= 0.12.6 -PORTREVISION= 0 +PORTREVISION= 1 DISTNAME= ${PORTNAME:S/-devel//}-${PORTVERSION} MAINTAINER= flz@FreeBSD.org diff --git a/net-p2p/libtorrent-devel/files/patch-src_data_memory__chunk.cc b/net-p2p/libtorrent-devel/files/patch-src_data_memory__chunk.cc new file mode 100644 index 000000000000..5e35bd2c6d45 --- /dev/null +++ b/net-p2p/libtorrent-devel/files/patch-src_data_memory__chunk.cc @@ -0,0 +1,20 @@ +*** src/data/memory_chunk.cc.orig Wed Feb 10 09:55:42 2010 +--- src/data/memory_chunk.cc Wed Feb 10 09:56:26 2010 +*************** +*** 78,87 **** +--- 78,90 ---- + void + MemoryChunk::unmap() { + if (!is_valid()) + throw internal_error("MemoryChunk::unmap() called on an invalid object"); + ++ if (msync(m_ptr, m_end - m_ptr,MS_INVALIDATE) != 0) ++ throw internal_error("MemoryChunk::unmap() - msync() system call failed"); ++ + if (munmap(m_ptr, m_end - m_ptr) != 0) + throw internal_error("MemoryChunk::unmap() system call failed: " + std::string(rak::error_number::current().c_str())); + } + + void + + |