diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2006-10-26 23:07:24 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2006-10-26 23:07:24 +0000 |
commit | ec9496bea543bd5ebb9214880c056b95446b6b13 (patch) | |
tree | f13a58e9814886bf7627a4f566caa7425bd61a25 /ACE/ace/MMAP_Memory_Pool.h | |
parent | d4ce64ef75457044ad7a9334f787d24fbb4c0a23 (diff) | |
download | ATCD-ec9496bea543bd5ebb9214880c056b95446b6b13.tar.gz |
ChangeLogTag:Thu Oct 27 01:59:19 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
Diffstat (limited to 'ACE/ace/MMAP_Memory_Pool.h')
-rw-r--r-- | ACE/ace/MMAP_Memory_Pool.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/ACE/ace/MMAP_Memory_Pool.h b/ACE/ace/MMAP_Memory_Pool.h index 0b8dffcc83c..5b9cc3f3186 100644 --- a/ACE/ace/MMAP_Memory_Pool.h +++ b/ACE/ace/MMAP_Memory_Pool.h @@ -67,7 +67,7 @@ public: ACE_MMAP_Memory_Pool_Options (const void *base_addr = ACE_DEFAULT_BASE_ADDR, int use_fixed_addr = ALWAYS_FIXED, int write_each_page = 1, - ACE_LOFF_T minimum_bytes = 0, + size_t minimum_bytes = 0, u_int flags = 0, int guess_on_fault = 1, LPSECURITY_ATTRIBUTES sa = 0, @@ -96,7 +96,7 @@ public: int write_each_page_; /// What the minimim bytes of the initial segment should be. - ACE_LOFF_T minimum_bytes_; + size_t minimum_bytes_; /// Any special flags that need to be used for @c mmap. u_int flags_; @@ -162,8 +162,13 @@ public: /// Sync the memory region to the backing store starting at /// @c this->base_addr_. - virtual int sync (ssize_t len = -1, int flags = MS_SYNC); + virtual int sync (size_t len, int flags = MS_SYNC); + /// Sync the memory region to the backing store starting at + /// @c this->base_addr_. Will sync as much as the backing file + /// allows. + virtual int sync (int flags = MS_SYNC); + /// Sync the memory region to the backing store starting at @a addr. virtual int sync (void *addr, size_t len, int flags = MS_SYNC); @@ -172,7 +177,13 @@ public: * starting at <this->base_addr_> up to <len> bytes. If <len> == -1 * then change protection of all pages in the mapped region. */ - virtual int protect (ssize_t len = -1, int prot = PROT_RDWR); + virtual int protect (size_t len, int prot = PROT_RDWR); + + /** + * Change the protection of all the pages of the mapped region to <prot> + * starting at <this->base_addr_>. + */ + virtual int protect (int prot = PROT_RDWR); /// Change the protection of the pages of the mapped region to @a prot /// starting at @a addr up to @a len bytes. @@ -222,10 +233,10 @@ protected: /// Compute the new @a map_size of the backing store and commit the /// memory. virtual int commit_backing_store_name (size_t rounded_bytes, - ACE_LOFF_T &map_size); + size_t & map_size); /// Memory map the file up to @a map_size bytes. - virtual int map_file (ACE_LOFF_T map_size); + virtual int map_file (size_t map_size); /// Handle SIGSEGV and SIGBUS signals to remap shared memory /// properly. @@ -255,7 +266,7 @@ protected: int write_each_page_; /// What the minimum bytes of the initial segment should be. - ACE_LOFF_T minimum_bytes_; + size_t minimum_bytes_; /// Name of the backing store where the shared memory pool is kept. ACE_TCHAR backing_store_name_[MAXPATHLEN + 1]; @@ -297,7 +308,10 @@ public: virtual ~ACE_Lite_MMAP_Memory_Pool (void); /// Overwrite the default sync behavior with no-op - virtual int sync (ssize_t len = -1, int flags = MS_SYNC); + virtual int sync (size_t len, int flags = MS_SYNC); + + /// Overwrite the default sync behavior with no-op + virtual int sync (int flags = MS_SYNC); /// Overwrite the default sync behavior with no-op virtual int sync (void *addr, size_t len, int flags = MS_SYNC); |