[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue May 24 07:16:17 CDT 2011
branch "master" has been updated
via 13b6132b4f653ae22175e55c14a375cf0ecb2622 (commit)
from 20239f35caeaca630680c7719c70808deeab42ca (commit)
Summary of changes:
src/PJSipManager.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 13b6132b4f653ae22175e55c14a375cf0ecb2622
Author: Brent Eagles <beagles at digium.com>
Date: Tue May 24 09:38:55 2011 -0230
pjsip was asserting() because it was running out of thread stack space on x64.
This may be related to the fact that pjlib assumes that long is the same size
as a pointer on the target platform. This isn't the case on Windows x64, a
pointer is 64 bit but sizeof(long) is still 32 bit.
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index f87a9cd..15f0c03 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -65,8 +65,14 @@ PJSipManager::PJSipManager(const Ice::PropertiesPtr& props)
{
lg(Error) << "Failed to create a memory pool";
}
+
+ //
+ // The stack size calculation is necessary to support x64. Due to the increased size
+ // of many of the structures PJSIP allocates on the thread stacks, the default size simply
+ // isn't big enough.
+ //
status = pj_thread_create(mMemoryPool, "SIP", (pj_thread_proc *) &monitorThread,
- mEndpoint, PJ_THREAD_DEFAULT_STACK_SIZE, 0, &mPjThread);
+ mEndpoint, PJ_THREAD_DEFAULT_STACK_SIZE * (sizeof(long*)/sizeof(long)), 0, &mPjThread);
if (status != PJ_SUCCESS)
{
lg(Error) << "Failed to create SIP maintenance thread";
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list