diff options
author | Max Kellermann <max@musicpd.org> | 2017-09-19 19:52:02 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-09-21 19:36:33 +0200 |
commit | 8753e558f24e177a355722f27463d9742b2bbd66 (patch) | |
tree | 3b1ff55900b49b8a87fac52915a759069243e5a4 /src/input/AsyncInputStream.cxx | |
parent | f6691579def38c60477d02cf57486364e4a0245c (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.cxx | 5 |
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() { |