Memory.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Palmsource, Inc.
00003  * 
00004  * This software is licensed as described in the file LICENSE, which
00005  * you should have received as part of this distribution. The terms
00006  * are also available at http://www.openbinder.org/license.html.
00007  * 
00008  * This software consists of voluntary contributions made by many
00009  * individuals. For the exact contribution history, see the revision
00010  * history and logs, available at http://www.openbinder.org
00011  */
00012 
00013 #ifndef _SUPPORT_MEMORY_H_
00014 #define _SUPPORT_MEMORY_H_
00015 
00020 #include <support/Binder.h>
00021 #include <support/IInterface.h>
00022 #include <support/Value.h>
00023 #include <support/IMemory.h>
00024 
00025 #if _SUPPORTS_NAMESPACE
00026 namespace palmos {
00027 namespace support {
00028 #endif
00029 
00034 #define MEMORYDEALER_NAME_TEMPLATE "/tmp/memoryarea.%s.%d"
00035 
00037 // BMemoryHeap
00039 
00041 class BMemoryHeap : public BnMemoryHeap
00042 {
00043 public:
00044                             BMemoryHeap(int32_t area, void* basePtr);
00045         virtual             ~BMemoryHeap();
00046         virtual int32_t     HeapID() const;
00047         virtual void *      HeapBase() const;
00048 private:
00049                 int32_t     m_area;
00050                 void *      m_basePtr;
00051 };
00052 
00055 #if _SUPPORTS_NAMESPACE
00056 } } // namespace palmos::support
00057 #endif
00058 
00059 #endif // _SUPPORT_MEMORY_H_