diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-17 13:15:04 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-17 13:16:15 -0700 |
| commit | 3aab46b0209adad0fd6f24b5b94b6401b13257b7 (patch) | |
| tree | bdb87d47375e81889b5a60159fd1465fd8b6aeca /src/rt/rust_obstack.cpp | |
| parent | 62ac9d0b2e437dd6c469596299ac7eac8ed96918 (diff) | |
| download | rust-3aab46b0209adad0fd6f24b5b94b6401b13257b7.tar.gz rust-3aab46b0209adad0fd6f24b5b94b6401b13257b7.zip | |
rustc: Mark an obstack fencepost when entering a dynamically-sized frame
Diffstat (limited to 'src/rt/rust_obstack.cpp')
| -rw-r--r-- | src/rt/rust_obstack.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rt/rust_obstack.cpp b/src/rt/rust_obstack.cpp index 342310d4b5c..9300ec49073 100644 --- a/src/rt/rust_obstack.cpp +++ b/src/rt/rust_obstack.cpp @@ -58,6 +58,14 @@ rust_obstack::alloc_new(size_t len) { return chunk->alloc(len); } +rust_obstack::~rust_obstack() { + while (chunk) { + rust_obstack_chunk *prev = chunk->prev; + task->free(chunk); + chunk = prev; + } +} + void * rust_obstack::alloc(size_t len) { if (!chunk) |
