Skip to content

Clarify why this crate doesn't use tc_free_sized #7

@jmcomets

Description

@jmcomets

There's an unclear comment here that doesn't explain why tc_free_sized isn't used.

The issue is well explained over at gperftools/gperftools#1096 (comment).

Summary:

  • it's less a bug from TCMalloc and more of a missed assumption that sized free can always be used
  • performance-wise there should be no noticeable impact (outside of micro-benchmarks)

Additionally, the upgrade to C++14 brought aligned new, which would be more correct to use; however under the hood both are implemented the same way (see the impl for memalign and tc_new_aligned), the only difference being one failing the C-fashion and the other the C++-fashion.

I'll leave this open as a small internal docs issue since there's not much required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions