mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-1593 Increase chances of getting a trace under memory shortage
This commit is contained in:
parent
a1f8c36983
commit
4a0c8053f2
@ -50,15 +50,16 @@ namespace mongo {
|
||||
inline void printStackTrace( ostream &o = cout ) {
|
||||
void *b[20];
|
||||
size_t size;
|
||||
char **strings;
|
||||
size_t i;
|
||||
|
||||
size = backtrace(b, 20);
|
||||
strings = backtrace_symbols(b, size);
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
o << hex << b[i] << dec << ' ';
|
||||
o << '\n';
|
||||
o << endl;
|
||||
|
||||
char **strings;
|
||||
|
||||
strings = backtrace_symbols(b, size);
|
||||
for (i = 0; i < size; i++)
|
||||
o << ' ' << strings[i] << '\n';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user