42 static const int kStackLength = 64;
43 void * stack[kStackLength];
46 size = backtrace(stack, kStackLength);
48 int result_count =
size - skip_count;
49 if (result_count < 0) {
52 if (result_count > max_depth) {
53 result_count = max_depth;
55 for (
int i = 0;
i < result_count;
i++) {
56 result[
i] = stack[
i + skip_count];
62 _END_GOOGLE_NAMESPACE_