On Fri, Aug 5, 2011 at 13:42, <gch...@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.