Ticket #23944: patch-tbb-older-malloc.diff

File patch-tbb-older-malloc.diff, 1.2 KB (added by barracuda156, 3 years ago)

A slight modification that makes TBB build on PPC

  • src/tbbmalloc/proxy_overload_osx.h

    diff --git src/tbbmalloc/proxy_overload_osx.h src/tbbmalloc/proxy_overload_osx.h
    index 53afe13..98f622d 100644
    struct DoMallocReplacement { 
    139139        introspect.force_unlock = &zone_force_unlock;
    140140        introspect.statistics = zone_statistics;
     141#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
    141142        introspect.zone_locked = &zone_locked;
    142143        introspect.enable_discharge_checking = &impl_zone_enable_discharge_checking;
    143144        introspect.disable_discharge_checking = &impl_zone_disable_discharge_checking;
    144145        introspect.discharge = &impl_zone_discharge;
    145 
     146#endif
    146147        zone.size = &impl_malloc_usable_size;
    147148        zone.malloc = &impl_malloc;
    148149        zone.calloc = &impl_calloc;
    struct DoMallocReplacement { 
    155156        zone.version = 8;
    156157        zone.memalign = impl_memalign;
     158#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
    157159        zone.free_definite_size = &impl_free_definite_size;
    158160        zone.pressure_relief = &impl_pressure_relief;
    159 
     161#endif
    160162        // make sure that default purgeable zone is initialized
    161163        malloc_default_purgeable_zone();
    162164        void* ptr = malloc(1);