Revision: 1777
http://complement.svn.sourceforge.net/complement/?rev=1777&view=rev
Author: complement
Date: 2007-10-24 09:57:30 -0700 (Wed, 24 Oct 2007)
Log Message:
-----------
what price of StEM, in terms of memory?
Added Paths:
-----------
trunk/complement/explore/lib/stem/sample/size/Makefile
trunk/complement/explore/lib/stem/sample/size/Makefile.inc
trunk/complement/explore/lib/stem/sample/size/sz.cc
Added: trunk/complement/explore/lib/stem/sample/size/Makefile
===================================================================
--- trunk/complement/explore/lib/stem/sample/size/Makefile (rev 0)
+++ trunk/complement/explore/lib/stem/sample/size/Makefile 2007-10-24 16:57:30 UTC (rev 1777)
@@ -0,0 +1,20 @@
+# -*- Makefile -*- Time-stamp: <07/10/15 20:16:57 ptr>
+
+SRCROOT := ../../../..
+COMPILER_NAME := gcc
+# ALL_TAGS := install-release-shared install-dbg-shared
+# CoMT_DIR := ../../external/complement/explore
+
+include Makefile.inc
+include ${SRCROOT}/Makefiles/gmake/top.mak
+
+# DEFS += -DUNIT_TEST
+INCLUDES += -I${CoMT_INCLUDE_DIR}
+
+release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem
+dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg
+ifndef WITHOUT_STLPORT
+stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg
+endif
+
+LDLIBS = -L${CoMT_LIB_DIR} -Wl,-rpath=${CoMT_LIB_DIR}:${STLPORT_LIB_DIR} ${PROJECT_LIBS}
Added: trunk/complement/explore/lib/stem/sample/size/Makefile.inc
===================================================================
--- trunk/complement/explore/lib/stem/sample/size/Makefile.inc (rev 0)
+++ trunk/complement/explore/lib/stem/sample/size/Makefile.inc 2007-10-24 16:57:30 UTC (rev 1777)
@@ -0,0 +1,5 @@
+# -*- Makefile -*-
+
+PRGNAME = sz
+
+SRC_CC = sz.cc
Added: trunk/complement/explore/lib/stem/sample/size/sz.cc
===================================================================
--- trunk/complement/explore/lib/stem/sample/size/sz.cc (rev 0)
+++ trunk/complement/explore/lib/stem/sample/size/sz.cc 2007-10-24 16:57:30 UTC (rev 1777)
@@ -0,0 +1,76 @@
+// -*- C++ -*- Time-stamp: <07/10/15 22:44:45 ptr>
+
+#include <stem/EventHandler.h>
+#include <stem/EvManager.h>
+
+#include <mt/xmt.h>
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+using namespace xmt;
+using namespace stem;
+
+class StSample :
+ public stem::EventHandler
+{
+ public:
+ StSample();
+ StSample( stem::addr_type id, const char *info = 0 );
+ StSample( const char *info );
+ ~StSample();
+
+ private:
+ void func( const stem::Event& );
+
+
+ DECLARE_RESPONSE_TABLE( StSample, stem::EventHandler );
+};
+
+StSample::StSample() :
+ stem::EventHandler()
+{
+}
+
+StSample::StSample( stem::addr_type id, const char *info ) :
+ stem::EventHandler( id, info )
+{
+}
+
+StSample::StSample( const char *info ) :
+ stem::EventHandler( info )
+{
+}
+
+StSample::~StSample()
+{
+}
+
+void StSample::func( const stem::Event& ev )
+{
+}
+
+DEFINE_RESPONSE_TABLE( StSample )
+ EV_EDS( ST_NULL, 0x200, func )
+END_RESPONSE_TABLE
+
+int main()
+{
+ for ( int i = 0; i < 50000; ++i ) {
+ StSample *s = new StSample;
+ }
+
+ cout << "ready" << endl;
+
+ string line;
+
+ while ( cin.good() ) {
+ getline( cin, line );
+ if ( !cin.fail() ) {
+ cerr << "local: " << line << endl;
+ }
+ }
+
+ return 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|