IMemory Class Reference
[Binder]

#include <support/IMemory.h>

Inheritance diagram for IMemory:

IInterface SAtom BnInterface< IMemory > BpInterface< IMemory > BnMemory List of all members.

Detailed Description

Handle on a shared memory region.

This object represents an allocation in a shared memory heap. The memory allocation it represents will not be deallocated until all references on this object (in all processes) have gone away. You do not explicitly free the memory yourself.

This object can be passed across processes, in which case access to the entire heap is transfered to the destination process.

Note:
This is a custom interface, it is not generated by pidgen.


Public Member Functions

void * FastPointer (const sptr< IBinder > &heap, ssize_t offset) const
 Retrieve memory address when you know the heap it exists in and offset there-in.
virtual sptr< IMemoryHeapGetMemory (ssize_t *offset=NULL, ssize_t *size=NULL) const =0
 Get the IMemoryHeap and offset into it of that block of memory.
void * Pointer () const
 A convenience to retrieve the memory pointer from a given IMemory.
ssize_t Size () const
 Retrieve the memory size.


Member Function Documentation

void * FastPointer const sptr< IBinder > &  heap,
ssize_t  offset
const
 

Retrieve memory address when you know the heap it exists in and offset there-in.

virtual sptr<IMemoryHeap> GetMemory ssize_t *  offset = NULL,
ssize_t *  size = NULL
const [pure virtual]
 

Get the IMemoryHeap and offset into it of that block of memory.

void * Pointer  )  const
 

A convenience to retrieve the memory pointer from a given IMemory.

ssize_t Size  )  const
 

Retrieve the memory size.


The documentation for this class was generated from the following files: