25 #error *****Isis.h MUST be included before any other files!*****
32 #include <QCoreApplication>
38 #define APPLICATION IsisMain
88 std::map<QString, void *> empty;
109 int main(
int argc,
char *argv[]) {
113 signal(SIGABRT,
Abort);
127 delete QCoreApplication::instance();
134 MyMutex *mutex =
new MyMutex();
135 std::fstream *alloc_output =
new std::fstream(
"/dev/null");
136 Debug(make_all_allocations_invisible_except(NULL));
137 ForAllDebugChannels(
if(debugChannel.is_on()) debugChannel.off());
138 Debug(dc::malloc.on());
139 Debug(libcw_do.on());
140 Debug(libcw_do.set_ostream(alloc_output));
141 Debug(libcw_do.set_ostream(alloc_output, mutex));
150 alloc_filter_ct alloc_filter;
151 std::vector<std::string> objmasks;
152 objmasks.push_back(
"libc.so*");
153 objmasks.push_back(
"libstdc++*");
154 std::vector<std::string> srcmasks;
155 srcmasks.push_back(
"*new_allocator.h*");
156 srcmasks.push_back(
"*set_ostream.inl*");
157 alloc_filter.hide_objectfiles_matching(objmasks);
158 alloc_filter.hide_sourcefiles_matching(srcmasks);
159 alloc_filter.hide_unknown_locations();
160 delete libcw_do.get_ostream();
161 libcw_do.set_ostream(&std::cout);
162 list_allocations_on(libcw_do, alloc_filter);
171 std::vector<std::string> currentStack;
174 std::cerr <<
"Segmentation Fault" << std::endl;
175 for(
unsigned int i = 1; i < currentStack.size(); i++) {
176 std::cerr << currentStack[i] << std::endl;
183 std::vector<std::string> currentStack;
186 std::cerr <<
"Abort" << std::endl;
187 for(
unsigned int i = 1; i < currentStack.size(); i++) {
188 std::cerr << currentStack[i] << std::endl;