diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-09 18:36:10 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-09 18:36:10 +0000 |
commit | 640225bdc5b8e8ec1a9b3916c0deac581a7b04e2 (patch) | |
tree | c3c53eb3d80e7cb4db2866245f5636a3b6c40014 /ace/Based_Pointer_Repository.cpp | |
parent | c690761463f2e9d66a1bc58eb29b495560f2b011 (diff) | |
download | ATCD-640225bdc5b8e8ec1a9b3916c0deac581a7b04e2.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Based_Pointer_Repository.cpp')
-rw-r--r-- | ace/Based_Pointer_Repository.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ace/Based_Pointer_Repository.cpp b/ace/Based_Pointer_Repository.cpp index 7209932d8ab..807534b0ebc 100644 --- a/ace/Based_Pointer_Repository.cpp +++ b/ace/Based_Pointer_Repository.cpp @@ -29,12 +29,14 @@ public: ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository (void) { + ACE_TRACE ("ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository"); ACE_NEW (this->rep_, ACE_Based_Pointer_Repository_Rep); } ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository (void) { + ACE_TRACE ("ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository"); delete this->rep_; } @@ -44,6 +46,7 @@ int ACE_Based_Pointer_Repository::find (void *addr, void *&base_addr) { + ACE_TRACE ("ACE_Based_Pointer_Repository::find"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); MAP_ENTRY *ce = 0; @@ -59,7 +62,7 @@ ACE_Based_Pointer_Repository::find (void *addr, return 1; } - // Assume base address 0 (e.g. if new'ed). + // Assume base address 0 (e.g., if new'ed). base_addr = 0; return 0; } @@ -71,6 +74,7 @@ int ACE_Based_Pointer_Repository::bind (void *addr, size_t size) { + ACE_TRACE ("ACE_Based_Pointer_Repository::bind"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); size_t *sizep; @@ -96,6 +100,7 @@ ACE_Based_Pointer_Repository::bind (void *addr, int ACE_Based_Pointer_Repository::unbind (void *addr) { + ACE_TRACE ("ACE_Based_Pointer_Repository::unbind"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); MAP_ENTRY *ce = 0; @@ -105,13 +110,16 @@ ACE_Based_Pointer_Repository::unbind (void *addr) iter.next (ce) != 0; iter.advance ()) { - // Check to see if <addr> is within any of the regions. + // Check to see if <addr> is within any of the regions and if + // so, delete the memory and unbind the key from the map. if (addr >= ce->ext_id_ && addr < ((char *) ce->ext_id_ + * (ce->int_id_))) - delete ce->int_id_; + { + delete ce->int_id_; - // Unbind base address. - return this->rep_->addr_map_.unbind (ce->ext_id_); + // Unbind base address. + return this->rep_->addr_map_.unbind (ce->ext_id_); + } } return 0; |