From 5afa815c1e09aa17273534e14fca477d5956dfa0 Mon Sep 17 00:00:00 2001 From: coryan Date: Thu, 2 Sep 1999 22:44:17 +0000 Subject: ChangeLogTag:Thu Sep 2 17:42:22 1999 Carlos O'Ryan --- ChangeLog-99b | 6 ++++++ ace/Malloc_T.cpp | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog-99b b/ChangeLog-99b index 51e44cf1065..e5331b62134 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,9 @@ +Thu Sep 2 17:42:22 1999 Carlos O'Ryan + + * ace/Malloc_T.cpp: + Eliminated UMR problem with the position independent malloc + support. Thanks to Doug for figuring this stuff out. + Thu Sep 2 12:21:41 1999 Douglas C. Schmidt * tests/Log_Msg_Test.cpp (test_log_msg_features): Changed the diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 2589f67a3db..c9b00c66ca4 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -168,20 +168,21 @@ ACE_Malloc::open (void) // Initialize the freelist pointer to point to the dummy // . new ((void *) &this->cb_ptr_->freep_) ACE_MALLOC_HEADER_PTR (&this->cb_ptr_->base_); + new ((void *) &this->cb_ptr_->freep_->next_block_) ACE_MALLOC_HEADER_PTR (this->cb_ptr_->freep_.addr ()); new ((void *) &this->cb_ptr_->name_head_) ACE_NAME_NODE_PTR; + this->cb_ptr_->freep_->size_ = 0; #else // Initialize the freelist pointer to point to the dummy // . this->cb_ptr_->freep_ = &this->cb_ptr_->base_; // initialize the name list to 0 + this->cb_ptr_->freep_->size_ = 0; + // Initialize the dummy to point to itself. + this->cb_ptr_->freep_->next_block_ = this->cb_ptr_->freep_; #endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */ this->cb_ptr_->name_head_ = (ACE_Name_Node *) 0; - // Initialize the dummy to point to itself. - this->cb_ptr_->freep_->size_ = 0; - this->cb_ptr_->freep_->next_block_ = this->cb_ptr_->freep_; - if (rounded_bytes > (sizeof *this->cb_ptr_ + sizeof (ACE_Malloc_Header))) { // If we've got any extra space at the end of the control -- cgit v1.2.1