1 #define ACE_BUILD_SVC_DLL
2 #include "ace/OS_NS_string.h"
3 #include "ace/Log_Msg.h"
4 #include "Performance_Test_Options.h"
5 #include "Benchmark_Performance.h"
7 #if defined (ACE_HAS_THREADS)
9 class ACE_Svc_Export Memory_Test
: public Benchmark_Performance
18 int ni
= this->thr_id ();
19 size_t length
= performance_test_options
.msg_size ();
20 char *from
= new char[length
];
21 char *to
= new char[length
];
25 while (!this->done ())
27 ACE_OS::memcpy (to
, from
, length
);
28 performance_test_options
.thr_work_count
[ni
]++;
34 ACE_SVC_FACTORY_DECLARE (Memory_Test
)
35 ACE_SVC_FACTORY_DEFINE (Memory_Test
)
37 // ACE_Service_Object_Type mt (&memory_test, "Memory_Test");
38 #endif /* ACE_HAS_THREADS */