diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-28 03:06:31 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-28 03:06:31 +0000 |
commit | 11cca36bc7c02ef1752616fd23b54a4e6c39656e (patch) | |
tree | b26562f7049f5b5db1c684592c384bacfd8331d3 /ace/Malloc_T.h | |
parent | 0b407e480f2bb4b3cc07218107850e8ad0a1d60c (diff) | |
download | ATCD-11cca36bc7c02ef1752616fd23b54a4e6c39656e.tar.gz |
ChangeLogTag:Fri Dec 27 20:06:39 2002 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/Malloc_T.h')
-rw-r--r-- | ace/Malloc_T.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h index 95ac6c157e2..32b4b2a31dd 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,6 +594,16 @@ 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); @@ -627,6 +637,9 @@ 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_; }; /** @@ -784,7 +797,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, |