aboutsummaryrefslogtreecommitdiff
path: root/pw_allocator/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'pw_allocator/BUILD.bazel')
-rw-r--r--pw_allocator/BUILD.bazel73
1 files changed, 58 insertions, 15 deletions
diff --git a/pw_allocator/BUILD.bazel b/pw_allocator/BUILD.bazel
index 6fb346750..c7c7d9ae3 100644
--- a/pw_allocator/BUILD.bazel
+++ b/pw_allocator/BUILD.bazel
@@ -57,17 +57,18 @@ pw_cc_library(
pw_cc_library(
name = "block",
- srcs = [
- "block.cc",
- ],
+ srcs = ["block.cc"],
hdrs = [
"public/pw_allocator/block.h",
],
includes = ["public"],
deps = [
"//pw_assert",
+ "//pw_bytes",
+ "//pw_result",
"//pw_span",
"//pw_status",
+ "//third_party/fuchsia:stdcompat",
],
)
@@ -120,12 +121,12 @@ pw_cc_library(
)
pw_cc_library(
- name = "split_free_list_allocator",
+ name = "libc_allocator",
srcs = [
- "split_free_list_allocator.cc",
+ "libc_allocator.cc",
],
hdrs = [
- "public/pw_allocator/split_free_list_allocator.h",
+ "public/pw_allocator/libc_allocator.h",
],
includes = ["public"],
deps = [
@@ -137,30 +138,45 @@ pw_cc_library(
)
pw_cc_library(
- name = "libc_allocator",
- srcs = [
- "libc_allocator.cc",
+ name = "null_allocator",
+ hdrs = [
+ "public/pw_allocator/null_allocator.h",
],
+ includes = ["public"],
+ deps = [
+ ":allocator",
+ ],
+)
+
+pw_cc_library(
+ name = "simple_allocator",
hdrs = [
- "public/pw_allocator/libc_allocator.h",
+ "public/pw_allocator/simple_allocator.h",
],
includes = ["public"],
deps = [
":allocator",
- "//pw_assert",
+ ":block",
"//pw_bytes",
- "//pw_status",
],
)
pw_cc_library(
- name = "null_allocator",
+ name = "split_free_list_allocator",
+ srcs = [
+ "split_free_list_allocator.cc",
+ ],
hdrs = [
- "public/pw_allocator/null_allocator.h",
+ "public/pw_allocator/split_free_list_allocator.h",
],
includes = ["public"],
deps = [
":allocator",
+ ":block",
+ "//pw_assert",
+ "//pw_bytes",
+ "//pw_result",
+ "//pw_status",
],
)
@@ -170,13 +186,16 @@ pw_cc_library(
"allocator_testing.cc",
],
hdrs = [
- "pw_allocator_private/allocator_testing.h",
+ "public/pw_allocator/allocator_testing.h",
],
+ includes = ["public"],
deps = [
":allocator",
":block",
+ ":simple_allocator",
"//pw_assert",
"//pw_bytes",
+ "//pw_unit_test",
],
)
@@ -276,14 +295,38 @@ pw_cc_test(
)
pw_cc_test(
+ name = "simple_allocator_test",
+ srcs = [
+ "simple_allocator_test.cc",
+ ],
+ deps = [
+ ":allocator_testing",
+ ":simple_allocator",
+ ],
+)
+
+pw_cc_test(
name = "split_free_list_allocator_test",
srcs = [
"split_free_list_allocator_test.cc",
],
deps = [
+ ":allocator_testing",
":split_free_list_allocator",
"//pw_bytes",
"//pw_containers:vector",
"//pw_unit_test",
],
)
+
+pw_cc_test(
+ name = "unique_ptr_test",
+ srcs = [
+ "unique_ptr_test.cc",
+ ],
+ deps = [
+ ":allocator",
+ ":allocator_testing",
+ "//pw_unit_test",
+ ],
+)