[PATCH] D78051: Introduce `EnvArray` data structure.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 13:35:08 PDT 2020


delcypher created this revision.
delcypher added reviewers: kubamracek, yln, kcc, dvyukov, vitalybuka, cryptoad, eugenis.
Herald added subscribers: Sanitizers, dexonsmith, mgorny.
Herald added a project: Sanitizers.
delcypher added a child revision: D77696: [Darwin] Teach `AtosSymbolizerProcess` to work on a copy of the environment..
delcypher added a parent revision: D78050: Introduce `__sanitizer::ArrayRef<T>` type..

It is a convenient data structure for operating on environment-variable
like arrays. The type takes template parameters that control the amount
of statically allocated storage the type has. The type uses this storage
in preference to performing heap allocations and has options to avoid
performing heap allocations altogether when performing insertions.

This design was chosen because it will be used in an environment that
may be memory constrained (just before launching a symbolizer process
where a out-of-memory situation may have ocurred).

Several unit tests are included but the type is not currently used
in any runtimes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78051

Files:
  compiler-rt/lib/sanitizer_common/CMakeLists.txt
  compiler-rt/lib/sanitizer_common/sanitizer_env_array.h
  compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
  compiler-rt/lib/sanitizer_common/tests/sanitizer_env_array_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78051.257091.patch
Type: text/x-patch
Size: 45869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200413/76ea07b9/attachment-0001.bin>


More information about the llvm-commits mailing list