Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
14b4adbd
Commit
14b4adbd
authored
Sep 03, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an optional interface to turn malloc debugging on and off.
parent
e270b432
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
Python/sysmodule.c
Python/sysmodule.c
+21
-0
No files found.
Python/sysmodule.c
View file @
14b4adbd
...
...
@@ -124,8 +124,29 @@ sys_setprofile(self, args)
return
None
;
}
#ifdef USE_MALLOPT
/* Link with -lmalloc (or -lmpc) on an SGI */
#include <malloc.h>
static
object
*
sys_mdebug
(
self
,
args
)
object
*
self
;
object
*
args
;
{
int
flag
;
if
(
!
getargs
(
args
,
"i"
,
&
flag
))
return
NULL
;
mallopt
(
M_DEBUG
,
flag
);
INCREF
(
None
);
return
None
;
}
#endif
/* USE_MALLOPT */
static
struct
methodlist
sys_methods
[]
=
{
{
"exit"
,
sys_exit
},
#ifdef USE_MALLOPT
{
"mdebug"
,
sys_mdebug
},
#endif
{
"setprofile"
,
sys_setprofile
},
{
"settrace"
,
sys_settrace
},
{
NULL
,
NULL
}
/* sentinel */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment