Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96a768fc authored by Mitch Phillips's avatar Mitch Phillips Committed by Automerger Merge Worker
Browse files

Merge "[MemInit] Use new MemInit API." am: 5daa3ab5 am: 87a946d8 am: b2bac598

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1555757

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e062a704e6e82f05c79d43ca0968e65f46534ce
parents f2be87f8 b2bac598
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@

#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
#include <binder/ProcessState.h>
#include <cutils/memory.h>
#include <cutils/properties.h>
#include <hidl/LegacySupport.h>
#include <malloc.h>

using android::status_t;
using android::hardware::defaultLazyPassthroughServiceImplementation;
@@ -46,7 +46,13 @@ int main()

    // b/166675194
    if (property_get_bool("ro.vendor.camera.provider24.disable_mem_init", false)) {
        process_disable_memory_mitigations();
        if (mallopt(M_BIONIC_ZERO_INIT, 0) == 0) {
            // Note - heap initialization is only present on devices with Scudo.
            // Devices with jemalloc don't have heap-init, and thus the mallopt
            // will fail. On these devices, you probably just want to remove the
            // property.
            ALOGE("Disabling heap initialization failed.");
        }
    }

    status_t status;