summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2014-06-08 20:27:00 +0200
committerTorbjorn Granlund <tege@gmplib.org>2014-06-08 20:27:00 +0200
commitdc7ceb27edd1c8cc9f5f5a109256371feee92f47 (patch)
tree822d9f46b1a67ad03a0db4f111016b7abe5b3d80 /gmp-impl.h
parentc8faf0881030b2db6e064d3cc97569f11ca4655c (diff)
downloadgmp-dc7ceb27edd1c8cc9f5f5a109256371feee92f47.tar.gz
(TMP_ALLOC): Decrease limit to about half.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index 1a317534d..b42dc477c 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -374,8 +374,9 @@ __GMP_DECLSPEC void __gmp_tmp_reentrant_free (struct tmp_reentrant_t *);
#define TMP_MARK __tmp_marker = 0
#define TMP_SALLOC(n) alloca(n)
#define TMP_BALLOC(n) __gmp_tmp_reentrant_alloc (&__tmp_marker, n)
+/* The peculiar stack allocation limit here is chosen for efficient asm. */
#define TMP_ALLOC(n) \
- (LIKELY ((n) < 65536) ? TMP_SALLOC(n) : TMP_BALLOC(n))
+ (LIKELY ((n) <= 0x7f00) ? TMP_SALLOC(n) : TMP_BALLOC(n))
#define TMP_SFREE
#define TMP_FREE \
do { \