incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [jira] Updated: (LUCY-100) Use alloca() for strings
Date Tue, 16 Feb 2010 01:06:27 GMT


Marvin Humphrey updated LUCY-100:

    Attachment: alloca.diff

This patch allows us to hide the ZombieCharBuf struct definition everywhere
except for within the autogenerated VTable defs (where it is used for class
names) and a few test files.  It also allows us to clean up the autogenerated
XS bindings somewhat as we get to avoid some intermediate automatic variables.
Lastly, we get to use stack memory for assembling filepaths, which makes it
easier to avoid leaking memory when an IO exception occurs.

> Use alloca() for strings
> ------------------------
>                 Key: LUCY-100
>                 URL:
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Minor
>         Attachments: alloca.diff
> 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().

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message