summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-12-17 15:28:25 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-12-17 15:28:25 (GMT)
commit5839e20e37267d1257342d2850e98b3ba1123cf0 (patch)
tree49d9048cda9d5fbd98c4370922f050be7ee89dfe /generic/tclInt.h
parent30ac6357580feb97c6b19c49d1aa724e32a3faf8 (diff)
downloadtcl-5839e20e37267d1257342d2850e98b3ba1123cf0.zip
tcl-5839e20e37267d1257342d2850e98b3ba1123cf0.tar.gz
tcl-5839e20e37267d1257342d2850e98b3ba1123cf0.tar.bz2
* generic/tclAlloc.c:
* generic/tclExecute.c: * generic/tclInt.h: * generic/tclThreadAlloc.c: Fix alignment for memory returned by TclStackAlloc; insure that all memory allocators align to 16-byte boundaries on 64 bit platforms [Bug 1851832, 1851524]
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 54a156f..b89b7b0 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.358 2007/12/13 15:23:18 dgp Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.359 2007/12/17 15:28:27 msofer Exp $
*/
#ifndef _TCLINT
@@ -2034,6 +2034,17 @@ struct LimitHandler {
#define UCHAR(c) ((unsigned char) (c))
/*
+ * This macro is used to properly align the memory allocated by Tcl, giving
+ * the same alignment as the native malloc
+ */
+
+#if defined(__APPLE__)
+#define TCL_ALLOCALIGN 16
+#else
+#define TCL_ALLOCALIGN (2*sizeof(void *))
+#endif
+
+/*
* This macro is used to determine the offset needed to safely allocate any
* data structure in memory. Given a starting offset or size, it "rounds up"
* or "aligns" the offset to the next 8-byte boundary so that any data