[ http://issues.apache.org/jira/browse/XERCESC-1428?page=all ]
James Berry closed XERCESC-1428:
--------------------------------
Resolution: Fixed
The third patch has been applied on branch jberry/3.0-unstable as revision
179673.
David: you could look it over now... ;)
Axel: Thanks!
-jdb
> new iconv-transcoder algorithm
> ------------------------------
>
> Key: XERCESC-1428
> URL: http://issues.apache.org/jira/browse/XERCESC-1428
> Project: Xerces-C++
> Type: Improvement
> Components: Utilities
> Environment: linux
> Reporter: Axel Weiss
> Assignee: James Berry
> Priority: Minor
> Attachments: transcoder-179120.diff, transcoder-179120.diff,
> transcoder-179371.diff
>
> James Berry wrote:
> > What if you make this initial buffer a static buffer? And allocate
> > the exact size needed at the end?
> > That keeps the memory cost constant, at the expense of a guaranteed
> > extra string copy.
> >
> > For cases where you exceed the static buffer size, continue to do
> > your size-doubling on overflow; for the cases where you exceed the
> > static buffer size, you'll continue to use excess memory.
> >
> > I think this tradeoff would be worth it...
> Ok, it now starts with a local buffer on the stack and creates a copy with
> the exact size needed, if this buffer was not exceeded. Otherwise, an always
> doubling buffer enlargement is performed, resulting in returning an excess
> buffer for the result.
> The patch is against 3.0-unstable-179120.
> Axel
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]