1# Copyright 2024 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21cc_library( 22 name = "base", 23 hdrs = ["public/pw_allocator/bucket/base.h"], 24 includes = ["public"], 25 visibility = ["//visibility:private"], 26 deps = [ 27 "//pw_allocator:config", 28 "//pw_allocator:deallocator", 29 "//pw_allocator/block:poisonable", 30 ], 31) 32 33cc_library( 34 name = "fast_sorted", 35 hdrs = ["public/pw_allocator/bucket/fast_sorted.h"], 36 includes = ["public"], 37 deps = [ 38 ":base", 39 "//pw_containers:intrusive_multimap", 40 ], 41) 42 43cc_library( 44 name = "sequenced", 45 hdrs = ["public/pw_allocator/bucket/sequenced.h"], 46 includes = ["public"], 47 deps = [ 48 ":base", 49 "//pw_containers:intrusive_list", 50 ], 51) 52 53cc_library( 54 name = "sorted", 55 hdrs = ["public/pw_allocator/bucket/sorted.h"], 56 includes = ["public"], 57 deps = [ 58 ":base", 59 "//pw_containers:intrusive_forward_list", 60 ], 61) 62 63cc_library( 64 name = "unordered", 65 hdrs = ["public/pw_allocator/bucket/unordered.h"], 66 includes = ["public"], 67 deps = [ 68 ":base", 69 "//pw_containers:intrusive_forward_list", 70 ], 71) 72 73cc_library( 74 name = "testing", 75 testonly = True, 76 hdrs = ["public/pw_allocator/bucket/testing.h"], 77 includes = ["public"], 78 deps = [ 79 "//pw_allocator:buffer", 80 "//pw_allocator:bump_allocator", 81 ], 82) 83 84pw_cc_test( 85 name = "fast_sorted_test", 86 srcs = ["fast_sorted_test.cc"], 87 deps = [ 88 ":fast_sorted", 89 ":testing", 90 "//pw_allocator/block:detailed_block", 91 ], 92) 93 94pw_cc_test( 95 name = "sequenced_test", 96 srcs = ["sequenced_test.cc"], 97 deps = [ 98 ":sequenced", 99 ":testing", 100 "//pw_allocator/block:detailed_block", 101 ], 102) 103 104pw_cc_test( 105 name = "sorted_test", 106 srcs = ["sorted_test.cc"], 107 deps = [ 108 ":sorted", 109 ":testing", 110 "//pw_allocator/block:detailed_block", 111 ], 112) 113 114pw_cc_test( 115 name = "unordered_test", 116 srcs = ["unordered_test.cc"], 117 deps = [ 118 ":testing", 119 ":unordered", 120 "//pw_allocator/block:detailed_block", 121 ], 122) 123 124filegroup( 125 name = "doxygen", 126 srcs = [ 127 "public/pw_allocator/bucket/fast_sorted.h", 128 "public/pw_allocator/bucket/sequenced.h", 129 "public/pw_allocator/bucket/sorted.h", 130 "public/pw_allocator/bucket/unordered.h", 131 ], 132) 133