00001
00009 #include <atoms/gen.hh>
00010 #include <atoms/error.hh>
00011 #include <ucontext.h>
00012 #include <stdlib.h>
00013 #include <assert.h>
00014
00015 namespace atoms {
00016
00017 DebugLogger StackOnly::LOGGER("org.atoms.slamb.StackOnly");
00018
00019 StackOnly::StackOnly() {
00020 #ifdef WITH_DMALLOC
00021 if (dmalloc_examine(reinterpret_cast<char*>(this), NULL, NULL, NULL, NULL)
00022 == DMALLOC_NOERROR || dmalloc_errno != 21 ) {
00023 LOGGER.logFatal("StackOnly object found on heap: %d (%s)",
00024 dmalloc_errno, dmalloc_strerror(dmalloc_errno));
00025 }
00026 #endif
00027 }
00028
00029 }