aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-08 19:39:24 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-08 19:39:24 +0000
commit3f77bd47c850a1a5d822c1dbac4102b8c72b192e (patch)
tree2349ac64b636e01efc7a48bc10a576fc76314f04 /include/asterisk
parentd20e2d200a7e4826a0833835eae6e0a31c1ed7f9 (diff)
Merged revisions 199630 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r199630 | seanbright | 2009-06-08 15:33:09 -0400 (Mon, 08 Jun 2009) | 32 lines Merged revisions 199626,199628 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r199626 | seanbright | 2009-06-08 15:24:32 -0400 (Mon, 08 Jun 2009) | 21 lines Increase the size of our thread stack on 64 bit processors. We were setting the stack size for each thread to 240KB regardless of architecture, which meant that in some scenarios we actually had less available stack space on 64 bit processors (pointers use 8 bytes instead of 4). So now we calculate the stack size we reserve based on the platform's __WORDSIZE, which gives us: 32 bit -> 240KB 64 bit -> 496KB 128 bit -> 1008KB (that's right, we're ready for 128 bit processors) Patch typed by me but written by several members of #asterisk-dev, including Kevin, Tilghman, and Qwell. (closes issue #14932) Reported by: jpiszcz Patches: 06052009_issue14932.patch uploaded by seanbright (license 71) Tested by: seanbright ........ r199628 | seanbright | 2009-06-08 15:28:33 -0400 (Mon, 08 Jun 2009) | 2 lines Fix a typo in the stack size calculation just introduced. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@199633 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/utils.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index cb150ae4e..05f15ac38 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -348,13 +348,13 @@ int ast_careful_fwrite(FILE *f, int fd, const char *s, size_t len, int timeoutms
/*
* Thread management support (should be moved to lock.h or a different header)
*/
-
-#define AST_STACKSIZE 240 * 1024
+
+#define AST_STACKSIZE (((__WORDSIZE * 8) - 16) * 1024)
#if defined(LOW_MEMORY)
-#define AST_BACKGROUND_STACKSIZE 48 * 1024
+#define AST_BACKGROUND_STACKSIZE (((__WORDSIZE * 2) - 16) * 1024)
#else
-#define AST_BACKGROUND_STACKSIZE 240 * 1024
+#define AST_BACKGROUND_STACKSIZE AST_STACKSIZE
#endif
void ast_register_thread(char *name);