alloca usage

Torbjorn Granlund tg at swox.com
Thu Nov 20 23:28:17 CET 2003


Kevin Ryde <user42 at zip.com.au> writes:

  Torbjorn Granlund <tg at swox.com> writes:
  >
  >   if (tsize > BIG)
  >     tp = (*__gmp_allocate_func) (tsize);
  >   else
  >     tp = TMP_ALLOC (tsize)
  
  I think that could be hidden within TMP_ALLOC.  If the big case is
  rated UNLIKELY() then it shouldn't be much of a slowdown, only an
  increase in code size.

Yes, that could be hidden in TMP_ALLOC, but since we need to
free malloc'ed storage explicitly, I don't consider that an
improvement.

-- 
Torbjörn


More information about the gmp-devel mailing list