Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-100

Use alloca() for strings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Core
    • None

    Description

      For security and reliability, Lucy eschews C-style NULL-terminated strings
      except when absolutely necessary, favoring CharBuf objects instead. However,
      we would prefer to keep structs opaque and to use stack memory instead of heap
      memory for small string values. Furthermore, we would like to use object
      pointers consistently rather than object structs.

      These ends can be achieved by deploying the the non-standard but widely
      available stack memory allocator alloca().

      Attachments

        1. alloca.diff
          88 kB
          Marvin Humphrey

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: