summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-12-01 00:32:17 +0100
committerKevin Ryde <user42@zip.com.au>2001-12-01 00:32:17 +0100
commitefcc78cd5151bb1740ee4aebfbd7b7e85750c6be (patch)
tree4df9a7a18af713017de6009eea851a78cea580d5
parent43580df806dd7c051487f63a1b9db40883cae61c (diff)
downloadgmp-efcc78cd5151bb1740ee4aebfbd7b7e85750c6be.tar.gz
Add possible inlining of tal-notreent.c.
-rw-r--r--doc/tasks.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/tasks.html b/doc/tasks.html
index 02735e820..d165f2733 100644
--- a/doc/tasks.html
+++ b/doc/tasks.html
@@ -299,6 +299,19 @@ Copyright 2000, 2001 Free Software Foundation, Inc.
<code>TMP</code> is called. Would need
<code>mp_set_memory_functions</code> to tell tal-notreent.c to release
any cached memory when changing allocation functions though.
+<li> <code>__gmp_tmp_alloc</code> from tal-notreent.c could be partially
+ inlined. If the current chunk has enough room then a couple of pointers
+ can be updated. Only if more space is required then a call to some sort
+ of <code>__gmp_tmp_increase</code> would be needed. The requirement that
+ <code>TMP_ALLOC</code> is an expression might make the implementation a
+ bit ugly and/or a bit sub-optimal.
+<pre>
+#define TMP_ALLOC(n)
+ ((ROUND_UP(n) > current->end - current->point ?
+ __gmp_tmp_increase (ROUND_UP (n)) : 0),
+ current->point += ROUND_UP (n),
+ current->point - ROUND_UP (n))
+</pre>
</ul>