Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[umf] create/destroy memory tracker in lib ctor/dtor #693

Merged
merged 1 commit into from
Jul 7, 2023

Commits on Jul 6, 2023

  1. [umf] create/destroy memory tracker in lib ctor/dtor

    instead of relying on global variable init/destruction on
    linux and on windows (when building UMF as a shared lib).
    
    In C++ no guarantee is made for initialization order of
    static variables across translation units.
    
    This is problematic when an application (e.g. SYCL) wants
    to do some cleanup in it's library destructor. Such application
    might want to specify priority for it's destructor (to make sure
    it's executed before any other library desturctor) but it doesn't
    seem to work for static variables.
    
    Memory tracker is still created as a global object when building
    UMF as a static lib on Windows - there is no
    __attribute__((destructor)) equivalent that would work for static
    library.
    igchor committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    07b7633 View commit details
    Browse the repository at this point in the history