Skip to content

Repeatedly creating and freeing a large allocation can fail on a 32bit system if not enough address reuse occurs #4253

Open
@RalfJung

Description

@RalfJung

This now fails on a 32bit Windows targets, but I think it's just a matter of randomness that we haven't seen this fail before:

    for _ in 0..10 {
        drop(Vec::<u8>::with_capacity(512 * 1024 * 1024));
    }

The trouble is that there is some chance we'll want to assign new unique addresses to each allocation, and of course that won't work if there's only 4 GB of space available in total.

We should probably either always try to reuse "sufficiently large" allocations, or always try reuse if we are otherwise running out of address space.

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