Representation in Memory
The representation of records in memory varies depending on the programming languages. Usually the fields are stored in consecutive positions in memory, in the same order as they are declared in the record type. This may result in two or more fields stored into the same word of memory; indeed, this feature is often used in systems programming to access specific bits of a word. On the other hand, most compilers will add padding fields, mostly invisible to the programmer, in order to comply with alignment constraints imposed by the machine—say, that a floating point field must occupy a single word.
Some languages may implement a record as an array of addresses pointing to the fields (and, possibly, to their names and/or types). Objects in object-oriented languages are often implemented in rather complicated ways, especially in languages that allow multiple class inheritance.
Read more about this topic: Record (computer Science)
Famous quotes containing the words representation in and/or memory:
“People accept a representation in which the elements of wish and fantasy are purposely included but which nevertheless proclaims to represent the past and to serve as a guide-rule for life, thereby hopelessly confusing the spheres of knowledge and will.”
—Johan Huizinga (18721945)
“Men like my father cannot die. They are with me still real in memory as they were in flesh. Loving and beloved forever. How green was my valley then.”
—Philip Dunne (19081992)