Skip to content
Tcl Source Code History Of Ticket 1299153
Login

History Of Ticket 1299153

Artifacts Associated With Ticket 1299153

  1. Ticket change [0ea9279db6] (rid 94655) by dgp on 2005-09-22 21:37:51:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The libtommath library has a
      configuration value MP_PREC
      that specifies the minimum number
      of mp_digits in an mp_int.  The
      default value of MP_PREC is 64.
      
      This means that once an integer
      value is too large to fit in a Tcl_WideInt,
      the storage requirements balloon from
      8 bytes to hold 64 bits to 256 bytes
      just for the digits array holding 64 4-byte
      mp_digits to hold 65 bits.
      
      Even worse is the Tcl routine
      TclBNInitBignumFromLong()
      which calls mp_init_size().  Through
      some quirkiness in libtommath,
      mp_init_size actually creates an
      mp_int with a minimum of
      2*MP_PREC mp_digits.  So when
      we're explicitly creating an
      mp_int to hold a long value -- one we
      know will fit in two mp_digits -- we're
      forced to allocate 128 mp_digits, or
      a whopping 512 bytes, just for the
      digits array.
      
      These defaults may be appropriate
      for some clients of libtommath, but
      they're not a good fit for Tcl to require
      such an explosion of memory expense
      just to cross over into mp_int's.
      
      There is an MP_LOW_MEM configuration
      that sets MP_PREC to 8 rather than 64.
      That would help a lot, but even that seems
      too abrupt across the wide->bignum transition.
      A value of MP_PREC = 4 would seem to be
      a better fit for Tcl's bignum needs.
      
      Even with that revision, we should probably
      rewrite TclBNInitBignumFromLong to
      avoid making a call to mp_init_size().
      Other mp_init_size() callers ought to be
      examined as well.
      
      
      
    4. foundin initialized to: "obsolete: 8.5a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: "MP_PREC is too large"
    11. type initialized to: "Bug"
  2. Ticket change [fb24fca8a3] (rid 92000) by dgp on 2005-09-23 23:47:52:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      -DMP_PREC=4 added to Makefiles
      on the numerics branch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [c95d573562] (rid 122269) by dgp on 2005-10-14 00:47:40:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      fixed by the TIP 237 merge.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"
    7. username: "dgp"
  4. Ticket change [5f6932b77b] (rid 115820) by dgp on 2005-10-14 00:47:41:

    1. closedate changed to: "2005-10-13T17:47:41"
    2. closer changed to: "dgp"