Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
7f52a9ad
Commit
7f52a9ad
authored
Oct 06, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code object: call destructor and free bjit code
parent
21ac70f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+3
-0
src/runtime/code.cpp
src/runtime/code.cpp
+2
-0
No files found.
src/codegen/irgen/hooks.cpp
View file @
7f52a9ad
...
...
@@ -694,6 +694,9 @@ void BoxedCode::addVersion(void* f, ConcreteCompilerType* rtn_type, const std::v
}
bool
BoxedCode
::
tryDeallocatingTheBJitCode
()
{
if
(
code_blocks
.
empty
())
return
true
;
// we can only delete the code object if we are not executing it currently
assert
(
bjit_num_inside
>=
0
);
if
(
bjit_num_inside
!=
0
)
{
...
...
src/runtime/code.cpp
View file @
7f52a9ad
...
...
@@ -107,7 +107,9 @@ void BoxedCode::dealloc(Box* b) noexcept {
Py_XDECREF
(
o
->
name
);
Py_XDECREF
(
o
->
_doc
);
o
->
tryDeallocatingTheBJitCode
();
o
->
source
.
reset
(
nullptr
);
o
->~
BoxedCode
();
o
->
cls
->
tp_free
(
o
);
}
...
...
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