diff options
author | Vic Yang <victoryang@google.com> | 2019-08-07 21:08:30 -0700 |
---|---|---|
committer | Vic Yang <victoryang@google.com> | 2019-08-08 10:53:21 -0700 |
commit | 45e2be47c80b5f72e23fc33031cc3ab3315f6de9 (patch) | |
tree | 355ba49a64a486da31a8a54b54280a2d6819f3e7 /transport/memory | |
parent | 5ea7f14be528d0cad546ce04afb7bd9de767f805 (diff) | |
download | libhidl-45e2be47c80b5f72e23fc33031cc3ab3315f6de9.tar.gz |
Make kAshmemMemoryName constexpr
It is the only object in the .bss section in
android.hidl.memory@1.0-impl. Make it constexpr so that it is
constructed at build time.
Bug: 138856262
Test: Build android.hidl.memory@1.0-impl on cuttlefish and see
its .bss section is gone.
Change-Id: I44bef02b5a67e5ddc15c5cb77a568ea3dd01a45d
Diffstat (limited to 'transport/memory')
-rw-r--r-- | transport/memory/1.0/default/HidlFetch.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/transport/memory/1.0/default/HidlFetch.cpp b/transport/memory/1.0/default/HidlFetch.cpp index d47cf97..a636e03 100644 --- a/transport/memory/1.0/default/HidlFetch.cpp +++ b/transport/memory/1.0/default/HidlFetch.cpp @@ -16,9 +16,11 @@ #include "HidlFetch.h" +#include <string_view> + #include "AshmemMapper.h" -static std::string kAshmemMemoryName = "ashmem"; +static constexpr std::string_view kAshmemMemoryName = "ashmem"; namespace android { namespace hidl { |