Skip to content

Expose tracemalloc C API to track/untrack memory blocks #74240

Closed

Description

@vstinner
BPO 30054
Nosy @vstinner
PRs
  • bpo-30054: Expose tracemalloc C API #1236
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-06-20.15:47:31.122>
    created_at = <Date 2017-04-12.13:42:25.341>
    labels = ['type-feature', '3.7']
    title = 'Expose tracemalloc C API to track/untrack memory blocks'
    updated_at = <Date 2017-06-20.15:47:31.121>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-06-20.15:47:31.121>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-20.15:47:31.122>
    closer = 'vstinner'
    components = []
    creation = <Date 2017-04-12.13:42:25.341>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30054
    keywords = []
    message_count = 7.0
    messages = ['291554', '291556', '291557', '291558', '292029', '296463', '296464']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'jtaylor']
    pr_nums = ['1236']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue30054'
    versions = ['Python 3.7']

    Activity

    1. vstinner commented on Apr 12, 2017

      @vstinner
      MemberAuthor

      The issue bpo-26530 added a private C API to manually track/untrack memory blocks in tracemalloc. I was just validated by Julian Taylor who confirms that the API works as expected:
      http://bugs.python.org/issue26530#msg291551

      So I propose to make the 3 newly added functions public and document them:

      • _PyTraceMalloc_Track()
      • _PyTraceMalloc_Untrack()
      • _PyTraceMalloc_GetTraceback()
    2. jtaylor commented on Apr 12, 2017

      jtaylormannequin
      Mannequin

      I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function.
      Exposing the tracing information should probably just go over python interfaces.

    3. vstinner commented on Apr 12, 2017

      @vstinner
      MemberAuthor

      What's the status in numpy? Is the current numpy release able to use CPython 3.6 tracemalloc private functions?

    4. jtaylor commented on Apr 12, 2017

      jtaylormannequin
      Mannequin

      With this changeset it would:
      numpy/numpy#8885

    5. vstinner commented on Apr 21, 2017

      @vstinner
      MemberAuthor

      @jtaylor: Ok, I created #1236

    6. vstinner commented on Jun 20, 2017

      @vstinner
      MemberAuthor

      New changeset 5ea4c06 by Victor Stinner in branch 'master':
      bpo-30054: Expose tracemalloc C API (bpo-1236)
      5ea4c06

    7. vstinner commented on Jun 20, 2017

      @vstinner
      MemberAuthor

      I merged my PR: the future Python 3.7 will provide a public C API to track memory allocations.

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifetype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions