Skip to content

Provide memory statistics to the garbage collector #69

@mmomtchev

Description

@mmomtchev

Currently, when handling a SWIG-proxied C/C++ object, the GC sees only the tip of the iceberg - namely the JavaScript proxy object - which is usually in the 60 to 80 bytes range.

When the GC decides to free this object, all allocated memory will be freed - so there is no leak.

However the GC may be much more reluctant to actually perform a garbage pass, since these objects are considered too small.

This can lead to out-of-memory errors If the program allocates large amounts of such objects.

This is a generic problem with automatic memory management languages in SWIG that is not specific to JavaScript.

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