Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
<shared> Attribute
◄Up► ◄Contents► ◄Index► ◄Back►
─────<shared> Attribute─────────────────────────────────────────────────────
Used by: CODE, DATA, SEGMENTS
Determines whether all instances of the program can share
EXECUTEREAD and READWRITE segments. For real-mode Windows and for
READWRITE data segments under OS/2. (Under OS/2, all code segments
and READONLY data segments are shared.)
Keyword Purpose
SHARED Default for DLLs. Specifies that one copy of the
segment is loaded and shared among all processes
accessing the application or DLL. This attribute
saves memory and can be used for code that is not
self-modifying. Alternate keyword is PURE.
NONSHARED Default for applications. Specifies that the
segment must be loaded separately for each
process. Alternate keyword is IMPURE.
The <shared> attribute and the <instance> attribute interact for
data segments. The <instance> attribute has keywords NONE, SINGLE,
and MULTIPLE. If DATA SINGLE is specified, LINK assumes SHARED. If
DATA MULTIPLE is specified, LINK assumes NONSHARED. Similarly,
DATA SHARED forces SINGLE and DATA NONSHARED forces MULTIPLE.
See: ◄<instance> Attribute►
-♦-