⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 try2

📁 linux 下的源代码分析阅读器 red hat公司新版
💻
字号:
The entities that the sds system concerns itself with are data objects.What a data object is can be discussed by referring to the semantics of the'C' language. At root, C understands a number of primitive data objects anddescribes them in statements such as	int icount;This statement requests space in memory for an object and detailssome decriptive information and a mechanism by which the memory can beaccessed. 'int' determines the amount of space needed(usually two or four byte) and where the space should be aligned in thecomputer address space. Depending on the stringency of the compiler, thispart of the statement may also restict the use of this data object as faras it can be determined at compile time, and in an extension of C where'overloading' is available, may go as far as directing the object to codewhich will interpret the bits in memory as an integer quantity as opposedto, for instance, a floating point value or a character string. Thus, 'int'is a declaration of generic properties to be associated with this memory.'icount' by contrast refers to a particular instance of this generic datatype.Space for a number of primitive objects may be requested by declaring amultiplicity:	float value[200];and C allows this multiplicity to be determined at run time via the memoryallocation routines:	double *bigval;	unsigned multiplicity = 200;		 .		 .		 .  bigval = (double *)calloc(multiplicity, sizeof(double));We then expand to compound data types, where associations of namedprimitive types are grouped for ease of manipulation and to allowcompile-time checking:	struct mystruct {		float offset;		float scale;		short data[1024]	} DataChannel;Here, some generic names are introduced: every instance of the structure'mystruct' will have a field called 'scale'; in this case it may beaccessed by 'DataChannel.scale'.In the case that a particular data space may contain more than one sort ofdata type, we may use the 'union':	union data {		struct mystruct DataChannel;		char   comment_field[64];	} DataRecord;and here the compiler will be able to work out the space which must beallocated (enough to contain the largest component of the union) and therelevant alignment.These mechanisms of expressing data constructs are extremely powerful, andthe use of pointers and run time allocation allows highly complex dataobjects to be constructed at runtime; within a given program the compilercan guard against many errors in data access and manipulation, anddebuggers using the symbol table can track faults that appear atruntime. However, almost all the information in these source statements islost to the program at runtime.It is the primary aim of SDS to encapsulate all this information so that,when data is moved out of the realm of a single compiled program theconvenience and safety of the data structuring and naming is availablewithout further - potentially buggy - effort. A step on the way is madewith systems such as RPC but the price paid here is that each program usingthe shared data must have specific stubs compiled in; flexibility is lostand a change in the data structure that a source produces may have largemaintenence costs. The downside of the SDS approach is the extra spaceoverhead needed to contain the added information; with memdium to largeblocks of scientific data, which tend to be highly repetitive in theirstructuring, this burden is often slight. Even with small data packets thegain in portability, security and flexibility may be worth it especiallywith the current generations of cheap memory high cpu machines. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -