partition_tag_types.h 891 B

12345678910111213141516171819202122232425
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_TAG_TYPES_H_
  5. #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_TAG_TYPES_H_
  6. #include <cstdint>
  7. // This header defines the types for MTECheckedPtr. Canonical
  8. // documentation available at `//base/memory/raw_ptr_mtecheckedptr.md`.
  9. namespace partition_alloc {
  10. // Use 8 bits for the partition tag. This is the "lower" byte of the
  11. // two top bytes in a 64-bit pointer. The "upper" byte of the same
  12. // is reserved for true ARM MTE.
  13. //
  14. // MTECheckedPtr is not yet compatible with ARM MTE, but it is a
  15. // distant goal to have them coexist.
  16. using PartitionTag = uint8_t;
  17. } // namespace partition_alloc
  18. #endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_TAG_TYPES_H_