Closed Bug 459158 Opened 13 years ago Closed 13 years ago
XPT files contain wasted space when written on a machine with 64-bit pointers
PT_SizeOfHeaderBlock decides how much space is needed for interface directory entries on disk by measuring the size of struct XPTInterfaceDirectoryEntry. That struct contains three pointers; on a machine where pointers are 64 bits, it is 12 bytes larger than the actual space required on disk. Thus, on a 64-bit-pointer machine, all XPT files have a gap between the end of the interface directory and the beginning of the data pool, whose size is proportional to the number of entries in the interface directory. I'd like to see this corrected mostly because a hypothetical .xpt writer based on the new pythonic idl parser wouldn't do it, and so the new code's .xpt files would not be identical to the old code's (on a 64-bit machine).
Attachment #342360 - Flags: review?(benjamin)
Comment on attachment 342360 [details] [diff] [review] calculate on-disk size of interface directory entries correctly [Checkin: Comment 1] http://hg.mozilla.org/mozilla-central/rev/95b40d8ba0e6
Attachment #342360 - Attachment description: calculate on-disk size of interface directory entries correctly → calculate on-disk size of interface directory entries correctly [Checkin: Comment 1]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.