00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_MMAP_ALLOCATOR_H
00014 #define TAO_MMAP_ALLOCATOR_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "tao/orbconf.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #ifdef ACE_HAS_SENDFILE
00025
00026 #include "ace/Malloc_T.h"
00027 #include "ace/MMAP_Memory_Pool.h"
00028 #include "ace/Thread_Mutex.h"
00029
00030
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032
00033
00034
00035
00036 typedef ACE_Allocator_Adapter <ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> > TAO_MMAP_Allocator_Base;
00037
00038
00039
00040
00041
00042
00043
00044
00045 class TAO_MMAP_Allocator
00046 : public TAO_MMAP_Allocator_Base
00047 {
00048 public:
00049
00050
00051 TAO_MMAP_Allocator (void);
00052
00053
00054 virtual ~TAO_MMAP_Allocator (void);
00055
00056
00057 ACE_HANDLE handle (void);
00058
00059
00060
00061 off_t offset (void * p);
00062
00063 private:
00064
00065
00066 TAO_MMAP_Allocator (TAO_MMAP_Allocator const &);
00067 void operator= (TAO_MMAP_Allocator const &);
00068
00069 };
00070
00071 TAO_END_VERSIONED_NAMESPACE_DECL
00072
00073 #endif
00074
00075 #include "ace/post.h"
00076
00077 #endif