summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-28 03:16:36 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-28 03:16:36 +0000
commitffd05af4cf7f373998b44b72cfad106a37491363 (patch)
tree1dca40f7bcebd31f2dac5325509ce5dce10149cd
parent99bb944aa9bc5f0a9031c692409b84af98f4b17b (diff)
downloadATCD-ffd05af4cf7f373998b44b72cfad106a37491363.tar.gz
Reverted accidental checkins
-rw-r--r--ace/MEM_SAP.cpp8
-rw-r--r--ace/Malloc_T.cpp23
-rw-r--r--ace/Malloc_T.h25
-rw-r--r--ace/Malloc_T.i6
4 files changed, 15 insertions, 47 deletions
diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp
index 1ee429f57c9..e9b6fe6fd6c 100644
--- a/ace/MEM_SAP.cpp
+++ b/ace/MEM_SAP.cpp
@@ -55,14 +55,6 @@ ACE_MEM_SAP::create_shm_malloc (const ACE_TCHAR *name,
options),
-1);
- if (this->shm_malloc_->bad () != 0)
- {
- this->shm_malloc_->remove (); // Cleanup OS resources
- delete this->shm_malloc_;
- this->shm_malloc_ = 0;
- return -1;
- }
-
return 0;
}
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index faf7b0f942a..5554f81a713 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -280,8 +280,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void)
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name)
- : memory_pool_ (pool_name),
- bad_flag_ (0)
+ : memory_pool_ (pool_name)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (pool_name == 0)
@@ -291,7 +290,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
ACE_DIRECTORY_SEPARATOR_CHAR)));
this->delete_lock_ = 1;
- if ((this->bad_flag_ = this->open ()) == -1)
+ if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("%p\n"),
ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
@@ -301,8 +300,7 @@ template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name,
const ACE_TCHAR *lock_name,
const ACE_MEM_POOL_OPTIONS *options)
- : memory_pool_ (pool_name, options),
- bad_flag_ (0)
+ : memory_pool_ (pool_name, options)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (lock_name != 0)
@@ -312,7 +310,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
ACE_DIRECTORY_SEPARATOR_CHAR)));
this->delete_lock_ = 1;
- if ((this->bad_flag_ = this->open ()) == -1)
+ if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("%p\n"),
ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
@@ -324,20 +322,18 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
const ACE_MEM_POOL_OPTIONS *options,
ACE_LOCK *lock)
: memory_pool_ (pool_name, options),
- lock_ (lock),
- delete_lock_ (0),
- bad_flag_ (0)
+ lock_ (lock)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (lock == 0)
{
- this->bad_flag_ = -1;
errno = EINVAL;
return;
}
+ this->delete_lock_ = 0;
- if ((this->bad_flag_ = this->open ()) == -1)
+ if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("%p\n"),
ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
@@ -349,14 +345,13 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
const ACE_TCHAR *lock_name,
const void *options)
: memory_pool_ (pool_name,
- (const ACE_MEM_POOL_OPTIONS *) options),
- bad_flag_ (0)
+ (const ACE_MEM_POOL_OPTIONS *) options)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
ACE_NEW (this->lock_, ACE_LOCK (lock_name));
this->delete_lock_ = 1;
- if ((this->bad_flag_ = this->open ()) == -1)
+ if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("%p\n"),
ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
index 32b4b2a31dd..95ac6c157e2 100644
--- a/ace/Malloc_T.h
+++ b/ace/Malloc_T.h
@@ -6,7 +6,7 @@
*
* $Id$
*
- * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> and
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> and
* Irfan Pyarali <irfan@cs.wustl.edu>
*/
//==========================================================================
@@ -215,7 +215,7 @@ public:
/**
* Note that @a pool_name should be located in
* a directory with the appropriate visibility and protection so
- * that all processes that need to access it can do so.
+ * that all processes that need to access it can do so.
* This constructor must be inline to avoid bugs with some C++
* compilers. */
ACE_Allocator_Adapter (const char *pool_name,
@@ -238,7 +238,7 @@ public:
/**
* Note that @a pool_name should be located in
* a directory with the appropriate visibility and protection so
- * that all processes that need to access it can do so.
+ * that all processes that need to access it can do so.
* This constructor must be inline to avoid bugs with some C++
* compilers. */
ACE_Allocator_Adapter (const wchar_t *pool_name,
@@ -423,7 +423,7 @@ public:
*
* Note that @a pool_name should be located in
* a directory with the appropriate visibility and protection so
- * that all processes that need to access it can do so.
+ * that all processes that need to access it can do so.
*/
ACE_Malloc_T (const ACE_TCHAR *pool_name = 0);
@@ -436,7 +436,7 @@ public:
*
* Note that @a pool_name should be located in
* a directory with the appropriate visibility and protection so
- * that all processes that need to access it can do so.
+ * that all processes that need to access it can do so.
*/
ACE_Malloc_T (const ACE_TCHAR *pool_name,
const ACE_TCHAR *lock_name,
@@ -594,16 +594,6 @@ public:
/// Return cb_ptr value.
void *base_addr (void);
- /**
- * Bad flag. This operation should be called immediately after the
- * construction of the Malloc object to query whether the object was
- * constructed successfully. If not, the user should invoke @c
- * remove and release the object (it is not usable.)
- * @retval 0 if all is fine. non-zero if this malloc object is
- * unuable.
- */
- int bad (void);
-
private:
/// Initialize the Malloc pool.
int open (void);
@@ -637,9 +627,6 @@ private:
/// Lock that ensures mutual exclusion for the memory pool.
ACE_LOCK *lock_;
int delete_lock_; // True if destructor should delete the lock
-
- /// Keep track of failure in constructor.
- int bad_flag_;
};
/**
@@ -797,7 +784,7 @@ public:
* initialize the underlying memory pool. Note that @a pool_name
* should be located in a directory with the appropriate visibility
* and protection so that all processes that need to access it can
- * do so.
+ * do so.
*/
ACE_Malloc (const ACE_TCHAR *pool_name,
const ACE_TCHAR *lock_name,
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
index 6093977e5bc..53f3d5cd78e 100644
--- a/ace/Malloc_T.i
+++ b/ace/Malloc_T.i
@@ -221,12 +221,6 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ref_counter (void)
}
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::bad (void)
-{
- return this->bad_flag_;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::release (int close)
{
ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1);