Skip to content

Deallocator running out of stack space #8295

Closed
@jjwhitney

Description

@jjwhitney

Deallocation of object chains seems to require stack space proportional to the size of the chain. The following example, for instance, fails with a "ran out of stack" error:

extern mod extra;

use extra::dlist::DList;
use extra::container::Deque;

fn main() {
    let mut m = ~ DList::new::<int>();

    for _ in range(0, 17000000) {
        m.push_front(0);
    }
    println("This line is printed");
    // Does not exit cleanly: "ran out of stack"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions