pw_allocator: Use inclusive language
Bug: 386
Change-Id: I13d1e80c4de46de6af2b4121f20dd84394db02d2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46602
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_allocator/block_test.cc b/pw_allocator/block_test.cc
index f70c826..6a07037 100644
--- a/pw_allocator/block_test.cc
+++ b/pw_allocator/block_test.cc
@@ -304,7 +304,7 @@
constexpr size_t kN = 1024;
alignas(Block*) byte bytes[kN];
- // Do a split, just to sanity check that the checks on Next/Prev are
+ // Do a split, just to check that the checks on Next/Prev are
// different...
Block* block = nullptr;
EXPECT_EQ(Block::Init(std::span(bytes, kN), &block), OkStatus());
@@ -320,7 +320,7 @@
constexpr size_t kN = 1024;
alignas(Block*) byte bytes[kN];
- // Do a split, just to sanity check that the checks on Next/Prev are
+ // Do a split, just to check that the checks on Next/Prev are
// different...
Block* block = nullptr;
EXPECT_EQ(Block::Init(std::span(bytes, kN), &block), OkStatus());
diff --git a/pw_allocator/docs.rst b/pw_allocator/docs.rst
index 853cb08..c46dd8f 100644
--- a/pw_allocator/docs.rst
+++ b/pw_allocator/docs.rst
@@ -14,12 +14,12 @@
Heap Integrity Check
====================
-The ``Block`` class provides two sanity check functions:
+The ``Block`` class provides two check functions:
- ``bool Block::IsValid()``: Returns ``true`` is the given block is valid
and ``false`` otherwise.
- ``void Block::CrashIfInvalid()``: Crash the program and output the reason
- why sanity check fails using ``PW_DCHECK``.
+ why the check fails using ``PW_DCHECK``.
Heap Poisoning
==============
@@ -36,7 +36,7 @@
When heap poisoning is enabled, ``pw_allocator`` will add ``sizeof(void*)``
bytes before and after the usable space of each ``Block``, and paint the space
-with a hard-coded randomized pattern. During each sanity check, ``pw_allocator``
+with a hard-coded randomized pattern. During each check, ``pw_allocator``
will check if the painted space still remains the pattern, and return ``false``
if the pattern is damaged.
diff --git a/pw_allocator/public/pw_allocator/block.h b/pw_allocator/public/pw_allocator/block.h
index 30753c0..3edc92c 100644
--- a/pw_allocator/public/pw_allocator/block.h
+++ b/pw_allocator/public/pw_allocator/block.h
@@ -98,7 +98,7 @@
// reality, this method just subtracts the appropriate amount from
// usable_space to point to the start of the owning block.
//
- // Be aware that this method does not do any sanity checking; passing a random
+ // Be aware that this method does not do any checking; passing a random
// pointer will return a non-null pointer.
static Block* FromUsableSpace(std::byte* usable_space) {
return reinterpret_cast<Block*>(usable_space - sizeof(Block) -