
Hi. I need to clean memory on function on PyEval_SetTrace. When the python code run a while test, the memory consumption goes up a lot (99% of the system). exemple: while 1 == 1: pass My trace function is simple. static map<char *, int, cmp_str> session_debug_user; char *user_console; int trace_trampoline( PyObject *obj, PyFrameObject *frame, int event, PyObject *arg) { try { //check if user has debug session if (session_debug_user.count(user_console) == 0) { return 0; } return 0; } PyObject *sys_settrace(PyObject *mod, PyObject *obj) { user_console = get_variable_char(obj, 0); PyEval_SetTrace(trace_trampoline, obj); return Py_None; } [cid:607bbc5e-5dd8-4a8b-ad96-dc31dce274a9] Att. Leandro Müller
participants (1)
-
Leandro Müller