Sun XDR aligns each primitive value on a four byte boundary, whereas CORBA CDR aligns a
primitive value of size n on an n-byte boundary. Discuss the trade-offs in choosing the sizes
occupied by primitive values.
What will be an ideal response?
Marshalling is simpler when the data matches the alignment boundaries of the computers involved. Four
bytes is large enough to support most architectures efficiently, but some space is wasted by smaller primitive
values. The hybrid method of CDR is more complex to implement, but saves some space in the marshalled
form. Although the example in Figure 4.8. shows that space is wasted at the end of each string because the
following long is aligned on a 4- byte boundary.
You might also like to view...
Images included with Microsoft Office or from Microsoft Office Online
A) Vector graphics B) Pictures C) Clip art
Which one of the following is true of basic disks?
a. When you add a brand-new hard disk to the computer, the disk is recognized as a basic disk. b. It does not contain partitions or logical drives. c. It is not supported by laptop computers. d. You can create an almost unlimited number of volumes.