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

Skip to content
Commit 0198ef5c authored by Erik Kline's avatar Erik Kline
Browse files

Add simple MemBlock class for managing byte array allocation

A class to encapsulate self-deleting byte arrays while preserving access
to the underlying length (without the length being part of the type, e.g.
std::array<>). By design, the only interface to the underlying bytes is
via Slice, to encourage safer memory access usage.

Test: as follows
    - built
    - flashed
    - booted
    - make -j 128 netdutils_test && \
      adb push out/target/product/<foo>/data/nativetest64/netdutils_test/netdutils_test /data/nativetest64/netdutils_test && \
      adb shell /data/nativetest64/netdutils_test
      passes
Bug: 78250686
Merged-In: I720b99888c4df560671327d118ea573653165b3d
Merged-In: Ibe47aeed269683f5f8997533768a341c6b94c502
Change-Id: Id3f3a2c8af7ae443ecb4d67bf0326b031626f53b
(cherry picked from aosp commit a41902ff)
parent e2d7ab91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment