The C storage model is the physical foundation implemented by the C program, and the C object model is the logical basis for C semantic implementation. C standard points out:
1.7 THE C Memory Model [Intro.Memory]
The fundamental storage unit in the C memory model is the byte. A byte is at least large enough to contain any member of the basic execution character set and is composed of a contiguous sequence of bits, the number of which is implementation-defined. The least significant bit is called the low-order bit; the most significant bit is called the high-order bit The memory available to a C program consists of one or more sequences of contiguous bytes Every byte has a unique address.C storage model. The basic storage unit is byte. One byte should have at least enough of any member of the runtime base set, and consist of a continuous bit that is defined according to the implementation. The minimum effective bit is called low sequence, and the maximum effective bit is called high order. The storage of the C program is constructed by one or more bytes continuous sequences. Each byte has a unique address.
1.8 THE C Object Model [Intro.Object]
The constructs in a C program create, destroy, refer to, access, and manipulate objects An object is a region of storage [Note:.. A function is not an object, regardless of whether or not it occupies storage in the way that objects do.] An object is created by definition (3.1), by a new-expression (5.3.4) or by the implementation (12.2) when needed. The properties of an object are determined when the object is created. An object can have a name (clause 3). An object has a storage duration (3.7) which influences its lifetime (3.8). An object has a type (3.9). The term object type refers to the type which the object is created. Some objects are polymorphic (10.3); the implementation generates information associated with each such object that makes it possible to determine that object's type during program execution For other objects, the interpretation of the values found therein is determined by the type of the expressions (clause 5). Used to Access Them.c creates, destroyed, references, access and operates objects. Object is a storage area. [Note: Whether it is the same as the object occupies the store, the function is not an object. 】 Objects are defined (3.1), New Expression (5.3.4) or by implementation. When the object is created, the characteristics of the object are determined. Objects can have names (chapter 3). The object has a storage type (3.7) and affects its life (3.8). The object has a type (3.9). The term object type indicates the type used when the object is created. Some objects are polymorphic (10.3); in order to determine the type of object in the program, implement the information generated for each such object. For other objects to access the types of objects (Chapter 5) of these objects, how to explain how they are stored.
Objects CAN Contain Other Objects, Called Sub-Objects. A Sub-Object Can Be a Member Sub-Object (9.2), A Base Class Sub - Object (Clause 10), or an Array Element. An Object That Is Not A Sub- Object of any Other Object is Called A Complete Object. Objects can contain other objects called sub-objects. The child object can be a member object (9.2), a base class object (chapter 10), or an array element. The object of the child objects of any other object is called a complete object. For EVERY Object X, There IS Some Object Called The Complete Object of X, Determined As Follows: For each object X, there is an object called X-based intact object, the determination is as follows:
IF x is a complete object, then x is the completion Object of x. If x is a complete object, the complete object of X is x. OtherWise, The Complete Object of X Is The Complete Object of The (Unique) Object That Contains x. Otherwise, the complete object of X is a complete object that contains X (unique).
If a complete object, a data member (9.2), or an array element is of class type, its type is considered the most derived class, to distinguish it from the class type of any base class subobject; an object of a most derived class TYPE IS CALLED A MOST DeriveD Object. If the full object, the data member, or array element has a class type, its type is considered to be the final party class, with the type of the type of sub-objects such as this class; a final distribution class Type objects are called final derived objects.
Unless it is a bit-field (9.6), a most derived object shall have a non-zero size and shall occupy one or more bytes of storage. Base class sub-objects may have zero size. An object of PODi) type (3.9 SHALL OCCUPY ContiGuous Bytes of Storage. Unless the final derived object always has a non-zero size and always takes up one byte storage. The base class sub-object can have zero size. The object of the PODI) Type (3.9) always takes up a continuous byte storage. i) The Acronym Pod Stands for "Plain Old Data" POD is the first letter of "old ordinary data".
[NOTE: C Provides A Variety of Built-in Types from existing type (3.9).] [Note: C has many built-in types, and provides several new types with existing types. Method (3.9). 】