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(); } }