summaryrefslogtreecommitdiff
path: root/src/input/AsyncInputStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-09-19 19:52:02 +0200
committerMax Kellermann <max@musicpd.org>2017-09-21 19:36:33 +0200
commit8753e558f24e177a355722f27463d9742b2bbd66 (patch)
tree3b1ff55900b49b8a87fac52915a759069243e5a4 /src/input/AsyncInputStream.cxx
parentf6691579def38c60477d02cf57486364e4a0245c (diff)
util/HugeAllocator: move MADV_DONTFORK setting to HugeForkCow()
Enforcing MADV_DONTFORK is a surprising limitation for this library which aims to be generic.
Diffstat (limited to 'src/input/AsyncInputStream.cxx')
-rw-r--r--src/input/AsyncInputStream.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx
index ecccf9f65..1792eb540 100644
--- a/src/input/AsyncInputStream.cxx
+++ b/src/input/AsyncInputStream.cxx
@@ -38,7 +38,10 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url,
deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)),
allocation(_buffer_size),
buffer((uint8_t *)allocation.get(), _buffer_size),
- resume_at(_resume_at) {}
+ resume_at(_resume_at)
+{
+ allocation.ForkCow(false);
+}
AsyncInputStream::~AsyncInputStream()
{