Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::Memory Class Reference

Memory is high speed transient storage managed by the operating system, for both itself and user processes, used to store data and programs. More...

#include <Memory.hpp>

Inheritance diagram for corelinux::Memory

Inheritance graph
[legend]
Collaboration diagram for corelinux::Memory:

Collaboration graph
[legend]
List of all members.

Public Methods

 Memory ( void ) throw ( Assertion )
 Default constructor.

virtual ~Memory ( void )
 Virtual Destructor.


Static Public Methods

MemoryStoragePtr createStorage ( Size aByteSize, Int Rights = OWNER_ALL ) throw ( StorageException )
 Default create method, creates a private block of read write shared memory of size aByteSize, sharing attributes default to owner. More...

MemoryStoragePtr createStorage ( MemoryIdentifierCref aIdentifier, Size aByteSize, CreateDisposition disp = CREATE_OR_REUSE, Int Rights = OWNER_ALL, AddressingConstraint addressing = READ_WRITE )
 Create method, creates or opens a specifically identified block of shared memory of size aByteSize, sharing attributes default to owner. More...

MemoryStoragePtr createStorage ( CharCptr aName, Size aByteSize, CreateDisposition disp = CREATE_OR_REUSE, Int Rights = OWNER_ALL , AddressingConstraint addressing = READ_WRITE )
 Create method, creates or opens a specifically identified block of shared memory of size aByteSize, sharing attributes default to owner. More...

void destroyStorage ( MemoryStoragePtr )
 Destroy a previously allocated storage block. More...


Protected Methods

 Memory ( MemoryCref ) throw ( Assertion )
 Copy constructor prohibited.

MemoryRef operator= ( MemoryCref ) throw ( Assertion )
 Assignment operator prohibited.

bool operator== ( MemoryCref ) const
 Equality always returns false.


Static Protected Attributes

MemoryManager theMemoryManager
 The singleton instance of Memory for synchronization.


Detailed Description

Memory is high speed transient storage managed by the operating system, for both itself and user processes, used to store data and programs.

Upon allocation request, the operating system provides user processes with a memory storage region that is in addition to the current memory resources (stack, program, data) of the process. The memory can be made visible to all processes in the system, a select few, or just to the process that requested the storage. If made visible to other processes, memory provides a fast and efficient way to transfer information between the processes, and in this manner can be catagorized as high speed interprocess communication. It is up to the processes that share this memory area to agree on a synchronization protocol. The operating system allows a process to "mark" a memory region attribute as:


Member Function Documentation

MemoryStoragePtr corelinux::Memory::createStorage ( CharCptr aName,
Size aByteSize,
CreateDisposition disp = CREATE_OR_REUSE,
Int aRights = OWNER_ALL,
AddressingConstraint addressing = READ_WRITE ) [static]
 

Create method, creates or opens a specifically identified block of shared memory of size aByteSize, sharing attributes default to owner.

Parameters:
string   name of shared memory storage.
Size   number of bytes to allocate
Int   rights specificed
Returns:
MemoryStorage pointer

MemoryStoragePtr corelinux::Memory::createStorage ( MemoryIdentifierCref aId,
Size aByteSize,
CreateDisposition disp = CREATE_OR_REUSE,
Int aRights = OWNER_ALL,
AddressingConstraint addressing = READ_WRITE ) [static]
 

Create method, creates or opens a specifically identified block of shared memory of size aByteSize, sharing attributes default to owner.

Parameters:
MemoryIdentifier   reference to identifier.
Size   number of bytes to allocate
Int   rights specificed
Returns:
MemoryStorage pointer

MemoryStoragePtr corelinux::Memory::createStorage ( Size aByteSize,
Int aPermission = OWNER_ALL ) throw ( StorageException ) [static]
 

Default create method, creates a private block of read write shared memory of size aByteSize, sharing attributes default to owner.

Parameters:
Size   number of bytes to allocate
Int   rights specificed
Returns:
MemoryStorage pointer

void corelinux::Memory::destroyStorage ( MemoryStoragePtr aMPtr ) [static]
 

Destroy a previously allocated storage block.

Parameters:
MemoryStorage   pointer to storage object


The documentation for this class was generated from the following files:
This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium