Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16411)

Side by Side Diff: Python/pythonrun.c

Issue 13390: Hunt memory allocations in addition to reference leaks
Patch Set: Created 6 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Objects/obmalloc.c ('k') | Python/sysmodule.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* Python interpreter top-level routines, including init/exit */ 2 /* Python interpreter top-level routines, including init/exit */
3 3
4 #include "Python.h" 4 #include "Python.h"
5 5
6 #include "Python-ast.h" 6 #include "Python-ast.h"
7 #undef Yield /* undefine macro conflicting with winbase.h */ 7 #undef Yield /* undefine macro conflicting with winbase.h */
8 #include "grammar.h" 8 #include "grammar.h"
9 #include "node.h" 9 #include "node.h"
10 #include "token.h" 10 #include "token.h"
(...skipping 20 matching lines...) Expand all
31 31
32 #ifdef MS_WINDOWS 32 #ifdef MS_WINDOWS
33 #undef BYTE 33 #undef BYTE
34 #include "windows.h" 34 #include "windows.h"
35 #define PATH_MAX MAXPATHLEN 35 #define PATH_MAX MAXPATHLEN
36 #endif 36 #endif
37 37
38 #ifndef Py_REF_DEBUG 38 #ifndef Py_REF_DEBUG
39 #define PRINT_TOTAL_REFS() 39 #define PRINT_TOTAL_REFS()
40 #else /* Py_REF_DEBUG */ 40 #else /* Py_REF_DEBUG */
41 #define PRINT_TOTAL_REFS() fprintf(stderr, \ 41 #define PRINT_TOTAL_REFS() fprintf(stderr, \
42 "[%" PY_FORMAT_SIZE_T "d refs]\n", \ 42 "[%" PY_FORMAT_SIZE_T "d refs, " \
43 _Py_GetRefTotal()) 43 "%" PY_FORMAT_SIZE_T "d blocks]\n", \
44 _Py_GetRefTotal(), _Py_GetAllocedBlocks())
44 #endif 45 #endif
45 46
46 #ifdef __cplusplus 47 #ifdef __cplusplus
47 extern "C" { 48 extern "C" {
48 #endif 49 #endif
49 50
50 extern wchar_t *Py_GetPath(void); 51 extern wchar_t *Py_GetPath(void);
51 52
52 extern grammar _PyParser_Grammar; /* From graminit.c */ 53 extern grammar _PyParser_Grammar; /* From graminit.c */
53 54
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 #undef PyRun_InteractiveLoop 2721 #undef PyRun_InteractiveLoop
2721 PyAPI_FUNC(int) 2722 PyAPI_FUNC(int)
2722 PyRun_InteractiveLoop(FILE *f, const char *p) 2723 PyRun_InteractiveLoop(FILE *f, const char *p)
2723 { 2724 {
2724 return PyRun_InteractiveLoopFlags(f, p, NULL); 2725 return PyRun_InteractiveLoopFlags(f, p, NULL);
2725 } 2726 }
2726 2727
2727 #ifdef __cplusplus 2728 #ifdef __cplusplus
2728 } 2729 }
2729 #endif 2730 #endif
OLDNEW
« no previous file with comments | « Objects/obmalloc.c ('k') | Python/sysmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+