From 2e37bbe9d6c92e2fc862de0f88735ed9eb8c17ae Mon Sep 17 00:00:00 2001 From: schmidt Date: Wed, 29 Jan 1997 02:38:49 +0000 Subject: foo --- ace/Memory_Pool.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'ace/Memory_Pool.cpp') diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp index a329fc8acac..19fe4e41bd1 100644 --- a/ace/Memory_Pool.cpp +++ b/ace/Memory_Pool.cpp @@ -105,7 +105,8 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name, const OPTIONS *options) : base_addr_ (0), flags_ (MAP_SHARED), - write_each_page_ (0) + write_each_page_ (0), + minimum_bytes_ (0) { ACE_TRACE ("ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool"); @@ -118,6 +119,7 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name, ACE_SET_BITS (flags_, MAP_FIXED); } this->write_each_page_ = options->write_each_page_; + this->minimum_bytes_ = options->minimum_bytes_; } if (backing_store_name == 0) @@ -235,6 +237,9 @@ ACE_MMAP_Memory_Pool::init_acquire (size_t nbytes, first_time = 0; + if (nbytes < this->minimum_bytes_) + nbytes = this->minimum_bytes_; + if (this->mmap_.open (this->backing_store_name_, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, ACE_DEFAULT_FILE_PERMS) != -1) @@ -281,10 +286,12 @@ ACE_MMAP_Memory_Pool::remap (void *addr) ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options (void *base_addr, int use_fixed_addr, - int write_each_page) + int write_each_page, + int minimum_bytes) : base_addr_ (base_addr), use_fixed_addr_ (use_fixed_addr), - write_each_page_ (write_each_page) + write_each_page_ (write_each_page), + minimum_bytes_ (minimum_bytes) { ACE_TRACE ("ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options"); } -- cgit v1.2.1