summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-01 18:03:22 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-01 18:03:22 +0000
commit4cb93b09f13a4ad3da30b2c5c859c7c3896b38bc (patch)
treef4079bfcf384449dd0ee5311042080a570850a90 /ace
parent72505d0d6f6ba5e03274b9f865e4a3f2b283c7a4 (diff)
downloadATCD-4cb93b09f13a4ad3da30b2c5c859c7c3896b38bc.tar.gz
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r--ace/Timeprobe.cpp13
-rw-r--r--ace/Timeprobe.h11
2 files changed, 6 insertions, 18 deletions
diff --git a/ace/Timeprobe.cpp b/ace/Timeprobe.cpp
index e629109343b..8ce9286ac0c 100644
--- a/ace/Timeprobe.cpp
+++ b/ace/Timeprobe.cpp
@@ -14,17 +14,13 @@
#include "ace/High_Res_Timer.h"
template <class ACE_LOCK>
-ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (u_long size,
- ACE_Allocator *alloc)
+ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (u_long size)
: timeprobes_ (0),
- allocator_ (alloc != 0 ? alloc : ACE_Allocator::instance ()),
lock_ (),
max_size_ (size),
current_size_ (0)
{
- ACE_NEW_MALLOC (this->timeprobes_,
- (ACE_timeprobe_t *) this->allocator_->malloc ((sizeof (ACE_timeprobe_t)) * this->max_size_),
- ACE_timeprobe_t[this->max_size_]);
+ this->timeprobes_ = new ACE_timeprobe_t[this->max_size_];
#ifdef VXWORKS
if (sysProcNumGet () == 0)
@@ -41,10 +37,7 @@ ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (u_long size,
template <class ACE_LOCK>
ACE_Timeprobe<ACE_LOCK>::~ACE_Timeprobe (void)
{
- for (u_long i = 0; i < this->max_size_; i++)
- this->timeprobes_[i].ACE_timeprobe_t::~ACE_timeprobe_t ();
-
- this->allocator_->free (this->timeprobes_);
+ delete this->timeprobes_;
}
template <class ACE_LOCK> void
diff --git a/ace/Timeprobe.h b/ace/Timeprobe.h
index 61476dc74af..e29d0af56f8 100644
--- a/ace/Timeprobe.h
+++ b/ace/Timeprobe.h
@@ -6,7 +6,7 @@
// This class is compiled only when ACE_COMPILE_TIMEPROBES is defined
#if defined (ACE_COMPILE_TIMEPROBES)
-#include "ace/Malloc.h"
+#include "ace/Containers.h"
// = Event Descriptions
struct ACE_Event_Descriptions
@@ -99,10 +99,8 @@ public:
// Default size of the slots in Timeprobe
};
- ACE_Timeprobe (u_long size = ACE_DEFAULT_TABLE_SIZE,
- ACE_Allocator *alloc = 0);
- // Create Timeprobes with <size> slots, using <alloc> for the
- // allocator.
+ ACE_Timeprobe (u_long size = ACE_DEFAULT_TABLE_SIZE);
+ // Create Timeprobes with <size> slots
~ACE_Timeprobe (void);
// Destructor
@@ -153,9 +151,6 @@ protected:
ACE_timeprobe_t *timeprobes_;
// Time probe slots
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
ACE_LOCK lock_;
// Synchronization variable.