00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_SHARED_MALLOC_SV_H
00015 #define ACE_SHARED_MALLOC_SV_H
00016 #include "ace/pre.h"
00017
00018 #include "ace/Shared_Memory.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "ace/SV_Shared_Memory.h"
00025
00026 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class ACE_Export ACE_Shared_Memory_SV : public ACE_Shared_Memory
00038 {
00039 public:
00040 enum
00041 {
00042 ACE_CREATE = IPC_CREAT,
00043 ACE_OPEN = 0
00044 };
00045
00046
00047 ACE_Shared_Memory_SV (void);
00048 ACE_Shared_Memory_SV (key_t id,
00049 int length,
00050 int create = ACE_Shared_Memory_SV::ACE_OPEN,
00051 int perms = ACE_DEFAULT_FILE_PERMS,
00052 void *addr = 0,
00053 int flags = 0);
00054
00055 int open (key_t id,
00056 int length,
00057 int create = ACE_Shared_Memory_SV::ACE_OPEN,
00058 int perms = ACE_DEFAULT_FILE_PERMS,
00059 void *addr = 0,
00060 int flags = 0);
00061
00062
00063 virtual int close (void);
00064
00065
00066 virtual int remove (void);
00067
00068
00069
00070 virtual void *malloc (size_t = 0);
00071
00072
00073 virtual int free (void *p);
00074
00075
00076 virtual int get_segment_size (void) const;
00077
00078
00079
00080 virtual ACE_HANDLE get_id (void) const;
00081
00082
00083 void dump (void) const;
00084
00085
00086 ACE_ALLOC_HOOK_DECLARE;
00087
00088 private:
00089
00090
00091 ACE_SV_Shared_Memory shared_memory_;
00092 };
00093
00094 ACE_END_VERSIONED_NAMESPACE_DECL
00095
00096 #if defined (__ACE_INLINE__)
00097 #include "ace/Shared_Memory_SV.inl"
00098 #endif
00099
00100 #include "ace/post.h"
00101 #endif