summaryrefslogtreecommitdiff
path: root/ace/Mem_Map.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-04 11:37:54 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-04 11:37:54 +0000
commit71c9372be67ed0df222f5c9863b98ebb819fd9d2 (patch)
tree575ca9c885d60e5e0fdddd7d54c37cca3777a44f /ace/Mem_Map.i
parentc9b5c8be1ed7e7f35d480a1dcad4ad67f23de2b7 (diff)
downloadATCD-71c9372be67ed0df222f5c9863b98ebb819fd9d2.tar.gz
.
Diffstat (limited to 'ace/Mem_Map.i')
-rw-r--r--ace/Mem_Map.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/ace/Mem_Map.i b/ace/Mem_Map.i
index 5e07e856627..4b8069c6138 100644
--- a/ace/Mem_Map.i
+++ b/ace/Mem_Map.i
@@ -40,6 +40,13 @@ ACE_Mem_Map::map (int len,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_Mem_Map::map");
+ // If we're already mapped at a particular location then try to
+ // remap the file using the same base address.
+ if (addr == 0 && this->base_addr_ != 0 && this->base_addr_ != MAP_FAILED)
+ {
+ share |= MAP_FIXED;
+ addr = this->base_addr_;
+ }
return this->map_it (this->handle (), len, prot,
share, addr, offset, sa);
}