Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(779)

Issue 4843044: [pph] Allocate string tables separately. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Diego Novillo
Modified:
12 years, 11 months ago
Reviewers:
Gabriel Charette
CC:
Lawrence Crowl, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -4 lines) Patch
M gcc/cp/pph-streamer-in.c View 3 chunks +27 lines, -4 lines 1 comment Download

Messages

Total messages: 3
Diego Novillo
This patch separates the string tables from input streams to allow the string tables to ...
12 years, 11 months ago (2011-08-04 17:12:29 UTC) #1
Gabriel Charette
Yep this fixes the problem I had with the strings being freed early. See comments ...
12 years, 11 months ago (2011-08-05 17:42:11 UTC) #2
Diego Novillo
12 years, 11 months ago (2011-08-05 17:51:12 UTC) #3
On Fri, Aug 5, 2011 at 13:42,  <gchare@google.com> wrote:

> Yep this fixes the problem I had with the strings being freed early.

Great.

>
http://codereview.appspot.com/4843044/diff/1/gcc/cp/pph-streamer-in.c#newcode157
> gcc/cp/pph-streamer-in.c:157: memcpy (new_strtab, strtab, strtab_size);
> I don't think we need to memcpy, to be more efficient instead we can
> just change the way stream->encoder.r.file_data is read to only read the
> pph_file_header + body into it, and fread the strtab straight into
> new_strtab.
>
> This implies more logic when reading, but is potentially more efficient.

Yeah, I thought about that, but I didn't want to make the file reading
logic more convoluted than it already is.  Maybe we can do that at
some later point.  And I think that the multiple read operations may
in fact be slower than memcpy'ing, but I didn't really try that.


Diego.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b