Skip to content

Memory leak in sparse_dict_free #3

@je-so

Description

@je-so

You forgot to free copied keys and values.

Also: Allocating every single value is slow. Instead allocate a single big memory pages and
allocate keys,values at the end of the used space.
If you manage the memory pages in a list then you should free every single page of this list in sparse_dict_free to prevent a memory leak.

Hint: If you develop on Linux with gcc you could use malloc_stats() to print the memory in use!

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