[cfe-dev] sizeof (RopeRefCountString)
Zhongxing Xu
xuzhongxing at gmail.com
Sun Sep 7 01:32:00 PDT 2008
Hi,
In RewriteRope.cpp, RewriteRope::MakeRopeString(const char *Start, const
char *End),
we calculate the AllocSize by:
unsigned AllocSize = sizeof(RopeRefCountString) - 1 + AllocChunkSize;
I guess here the intention is: sizeof(RopeRefCountString) is 5. But gcc says
sizeof(RopeRefCountString) is 8. So the actual AllocSize is 4087. Should we
minus 4 instead of 1 to make the AllocSize 4084?
-Zhongxing Xu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080907/c578b3dd/attachment.html>
More information about the cfe-dev
mailing list