Skip to content

Realloc is a bit confusing #107875

Closed
Closed
@alexevier

Description

@alexevier

Location

https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#method.realloc

Summary

Realloc (in the trait for GlobalAlloc) is confusing in my opinion, what means the new_size parameter?
The size in bytes or how many times the size that is inside the layout?
In the way it is written seems to mean the bytes but it should be explicit that it means the size in bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions