diff src/puresize.h @ 96987:359d8fb73538

(PURESIZE_CHECKING_RATIO): New macro. (PURESIZE): Use it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 24 Jul 2008 20:26:48 +0000
parents 326ca810843d
children 4e53ad6f16b6
line wrap: on
line diff
--- a/src/puresize.h	Thu Jul 24 18:46:01 2008 +0000
+++ b/src/puresize.h	Thu Jul 24 20:26:48 2008 +0000
@@ -53,9 +53,18 @@
 #endif
 #endif
 
+#ifdef ENABLE_CHECKING
+/* ENABLE_CHECKING somehow increases the purespace used, probably because
+   it tends to cause some macro arguments to be evaluated twice.  This is
+   a bug, but it's difficult to track it down.  */
+#define PURESIZE_CHECKING_RATIO 12/10	/* Don't surround with `()'. */
+#else
+#define PURESIZE_CHECKING_RATIO 1
+#endif
+
 /* This is the actual size in bytes to allocate.  */
 #ifndef PURESIZE
-#define PURESIZE  (BASE_PURESIZE * PURESIZE_RATIO)
+#define PURESIZE  (BASE_PURESIZE * PURESIZE_RATIO * PURESIZE_CHECKING_RATIO)
 #endif
 
 /* Signal an error if OBJ is pure.  */