| OLD | NEW |
| 1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 // --- | 30 // --- |
| 31 // Author: Craig Silverstein | 31 // Author: Craig Silverstein |
| 32 | 32 |
| 33 #ifndef TCMALLOC_SYMBOLIZE_H_ | 33 #ifndef TCMALLOC_SYMBOLIZE_H_ |
| 34 #define TCMALLOC_SYMBOLIZE_H_ | 34 #define TCMALLOC_SYMBOLIZE_H_ |
| 35 | 35 |
| 36 #include "config.h" | |
| 37 #ifdef HAVE_STDINT_H | |
| 38 #include <stdint.h> // for uintptr_t | |
| 39 #endif | |
| 40 #include <map> | 36 #include <map> |
| 41 | 37 |
| 42 using std::map; | 38 using std::map; |
| 43 | 39 |
| 44 // An average size of memory allocated for a stack trace symbol. | 40 // An average size of memory allocated for a stack trace symbol. |
| 45 static const int kSymbolSize = 1024; | 41 static const int kSymbolSize = 1024; |
| 46 | 42 |
| 47 // TODO(glider): it's better to make SymbolMap a class that encapsulates the | 43 // TODO(glider): it's better to make SymbolMap a class that encapsulates the |
| 48 // address operations and has the Symbolize() method. | 44 // address operations and has the Symbolize() method. |
| 49 typedef map<uintptr_t, const char*> SymbolMap; | 45 typedef map<uintptr_t, char*> SymbolMap; |
| 50 | 46 |
| 51 extern bool Symbolize(char *out, int out_size, | 47 extern bool Symbolize(char *out, int out_size, |
| 52 SymbolMap *symbolization_table); | 48 SymbolMap *symbolization_table); |
| 53 | 49 |
| 54 #endif // TCMALLOC_SYMBOLIZE_H_ | 50 #endif // TCMALLOC_SYMBOLIZE_H_ |
| OLD | NEW |