-With larger arrays and complex data structures, one would often benefit
-from being able to avoid the copy altogether. This can be accomplished by
-altering the interface semantics. All of the parameter attributes but
-"copy" do this, and thus cannot be changed without breaking interface
-compatibility. None of the current parameter attributes can be combined
-with any other current parameter attribute.
-
-1.2.1 Default Semantics
-=======================
-
-If no attribute is specified, "in" parameters are visible only until the
-method returns, and are read-only. There will be a "duplicate" function
-provided by the language binding for the server to use if it wants to
-retain and/or write to the data. For "small" data (the threshold needs to
-be empirically determined), it just makes a copy. For "large" data, the
-pages will be copy-on-write mapped (unless the caller asks for an
-immediate copy). The only real reason not to use the immediate flag for
-small data (as determined by the programmer) as well (rather than have a
-threshold) is so that the threshold can be tunable based on the relative
-performance of copies versus traps on a given system. It'd also be nice
-if the programmer could ask a profiler to determine whether large data
-should be COWed or copied immediately on a per-call basis.
-
-When the "duplicate" function is called, a copy-on-write mapping of the
-data will be created. Edge data will be overmapped regardless of page
-type, but the overmap status will be retained (so that edge pages will not
-be overmapped into some other address space), though read overmap will be
-promoted to read/write overmap, as the extra data in the copy will not be
-used anymore. There will be an option to the "duplicate" function to
-create fully overmappable pages by copying the edge data and zeroing the
-rest of the edge pages (in case the caller wants to share the data).
-
-1.2.2 Copy
-==========
+implementation attribute: An attribute that is defined only for a specific
+server object, and affects only the server stubs. It can be changed
+without breaking client compatibility.
+
+interface attribute: An attribute that is defined as a part of an IDL
+interface, and cannot be changed without breaking compatibility.
+
+local: The method being called exists in the caller's address space, and
+thus no marshalling need occur.
+
+remote: The method being called exists in an address space other than the
+caller's. All data must be marshalled and passed through some form of
+IPC.
+
+1.3 In Parameters
+=================
+
+Built-in datatypes, bitfields, enums, and inline structs and arrays are
+passed directly by value (or, depending on the ABI, a reference valid
+until the end of the method for out parameters), and thus do not require
+memory management for local calls. For remote calls, data passed by
+value is treated as a single non-inline struct for synchronous methods,
+and as an inline struct (copied at invocation time, and freed when the
+message is removed from the queue by the ORB) for async methods.
+
+Object references are reference counted both at the ORB and process
+level, and are unique in that the client data structures are read-only
+and uncopyable (because a unique object needs a unique address) within an
+address space; most of this section does not apply to them.
+
+That leaves non-inline structs and arrays. These are passed as a simple
+pointer (plus a length field in the case of arrays), with the method
+copying anything it wants to change and/or keep beyond the end of the
+method. For async methods, the caller needs to avoid modifying referenced
+memory until it knows the method has been executed (in the remote case, it
+only matters until the ORB has COWed or copied the memory, but client code
+should not depend on this, or it will not work with an local server).
+There are no allocator or alignment restrictions on the memory being
+passed (though page alignment and overmap can improve performance when
+sending large buffers).
+
+If the server wants to keep the data past the end of the method, or if it
+wants to modify the data, it must call a duplicate() function to copy the
+data, map it copy-on-write. Struct duplications will need to do a deep
+copy without being confused by reference loops (possibly by using a hash
+table or other associative array to identify reference loops if IDLC
+determines that they are possible with that particular type of struct).
+
+To avoid a double-copy, remote methods may want to merely ask the ORB to
+give it full, permanent access (via COW if not already copied) to the
+memory. This may be hard to implement, though, as it requires the server
+to know that the data came from an remote implementation, and be able to
+modify the set of pages that the ORB reclaims at the end of the method
+call. This may not provide a significant benefit over simply creating a
+new copy-on-write mapping.
+
+In remote calls, the caller is charged with the temporary allocations made
+by the ORB in the callee's address space.
+
+1.3.1 Copy (interface)
+======================
+
+The "copy" interface attribute may be used to achieve the effect of
+calling duplicate() in the server. For local calls, this simply results
+in a call to duplicate() in the client stubs. For remote calls, the
+copied data segments are marked with the Copy flag, which are read/write
+(using copy-on-write) and not freed at the end of the method. These pages
+are charged to the callee, and must be freed using the callee's ORB memory
+manager. The callee should be able to specify how much data it is willing
+to have copied to a given object.
+
+The "copy" interface attribute may not be used on "out" parameters, and
+for "inout" parameters only applies to the "in" phase. Do not confuse
+this with the implementation "copy" attribute used on "out" parameters.