• Tudor Bosman's avatar
    Harden usingJEMalloc() · cd838428
    Tudor Bosman authored
    Summary:
    In a shared library, we're using whichever memory allocator the main program
    uses, but we may still believe we're using jemalloc if we load libjemalloc.so
    (because rallocm is defined). This means we'll pass to rallocm pointers that
    were not allocated by jemalloc, which is bad.
    
    Test Plan: tests added
    
    Reviewed By: ngbronson@fb.com
    
    FB internal diff: D1228483
    cd838428
Malloc.cpp 873 Bytes