From 894694e7a4e18ea7ffdada562a6233bdc3bddc56 Mon Sep 17 00:00:00 2001 From: sletz Date: Tue, 22 Nov 2011 14:50:04 +0000 Subject: [PATCH] Correct JackShmReadWritePtr1::Init. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4594 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/JackShmMem.cpp | 2 +- common/JackShmMem.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/JackShmMem.cpp b/common/JackShmMem.cpp index 26ef492b..e5803fda 100644 --- a/common/JackShmMem.cpp +++ b/common/JackShmMem.cpp @@ -111,7 +111,7 @@ void LockMemoryImp(void* ptr, size_t size) if (CHECK_MLOCK((char*)ptr, size)) { jack_log("Succeeded in locking %u byte memory area", size); } else { - jack_error("Cannot lock down memory area (%s)", strerror(errno)); + jack_error("Cannot lock down %u byte memory area (%s)", size, strerror(errno)); } } diff --git a/common/JackShmMem.h b/common/JackShmMem.h index 13d1c43a..397434fc 100644 --- a/common/JackShmMem.h +++ b/common/JackShmMem.h @@ -245,13 +245,13 @@ class JackShmReadWritePtr1 if (jack_attach_lib_shm(&fInfo)) { throw std::bad_alloc(); } + GetShmAddress()->LockMemory(); /* nobody else needs to access this shared memory any more, so destroy it. because we have our own attachment to it, it won't vanish till we exit (and release it). */ jack_destroy_shm(&fInfo); - GetShmAddress()->LockMemory(); } }