pw_allocator: Remove Layout from Deallocate and Resize

The `Layout` parameter has found not to be needed for all the allocators
provided by the pw_allocator module. Either they store layout data
inline, or can infer it from fixed sizes. Removing the `Layout`
parameters also has benefits, including allowing `Delete` to work with
non-final types, and freeing `UniquePtr` from needing to carry a
`Layout` with it.

As a result of this change, the `GetRequestedLayout`, `GetUsableLayout`,
`GetAllocatedLayout`, and `Query` methods are no longer needed as part
of the public API. They have been converted into static, protected
methods to restrict them to only being called by any derived object.

Change-Id: I7b7e7b19e44d2d6238030e0aef72c06d64153d33
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/198153
Reviewed-by: Taylor Cramer <cramertj@google.com>
Commit-Queue: Aaron Green <aarongreen@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
32 files changed
tree: 190e6337645f1777d3926e661bd82f1981d74c1f
  1. .allstar/
  2. .vscode/
  3. build_overrides/
  4. docker/
  5. docs/
  6. kudzu/
  7. pw_alignment/
  8. pw_allocator/
  9. pw_analog/
  10. pw_android_toolchain/
  11. pw_arduino_build/
  12. pw_assert/
  13. pw_assert_basic/
  14. pw_assert_log/
  15. pw_assert_tokenized/
  16. pw_assert_zephyr/
  17. pw_async/
  18. pw_async2/
  19. pw_async2_basic/
  20. pw_async2_epoll/
  21. pw_async_basic/
  22. pw_base64/
  23. pw_bloat/
  24. pw_blob_store/
  25. pw_bluetooth/
  26. pw_bluetooth_hci/
  27. pw_bluetooth_profiles/
  28. pw_bluetooth_proxy/
  29. pw_bluetooth_sapphire/
  30. pw_boot/
  31. pw_boot_cortex_m/
  32. pw_build/
  33. pw_build_android/
  34. pw_build_info/
  35. pw_build_mcuxpresso/
  36. pw_bytes/
  37. pw_channel/
  38. pw_checksum/
  39. pw_chre/
  40. pw_chrono/
  41. pw_chrono_embos/
  42. pw_chrono_freertos/
  43. pw_chrono_rp2040/
  44. pw_chrono_stl/
  45. pw_chrono_threadx/
  46. pw_chrono_zephyr/
  47. pw_cli/
  48. pw_compilation_testing/
  49. pw_config_loader/
  50. pw_console/
  51. pw_containers/
  52. pw_cpu_exception/
  53. pw_cpu_exception_cortex_m/
  54. pw_crypto/
  55. pw_digital_io/
  56. pw_digital_io_linux/
  57. pw_digital_io_mcuxpresso/
  58. pw_digital_io_rp2040/
  59. pw_docgen/
  60. pw_doctor/
  61. pw_emu/
  62. pw_env_setup/
  63. pw_env_setup_zephyr/
  64. pw_file/
  65. pw_format/
  66. pw_function/
  67. pw_fuzzer/
  68. pw_grpc/
  69. pw_hdlc/
  70. pw_hex_dump/
  71. pw_i2c/
  72. pw_i2c_linux/
  73. pw_i2c_mcuxpresso/
  74. pw_i2c_rp2040/
  75. pw_ide/
  76. pw_interrupt/
  77. pw_interrupt_cortex_m/
  78. pw_interrupt_xtensa/
  79. pw_interrupt_zephyr/
  80. pw_intrusive_ptr/
  81. pw_json/
  82. pw_kvs/
  83. pw_libc/
  84. pw_libcxx/
  85. pw_log/
  86. pw_log_android/
  87. pw_log_basic/
  88. pw_log_null/
  89. pw_log_rpc/
  90. pw_log_string/
  91. pw_log_tokenized/
  92. pw_log_zephyr/
  93. pw_malloc/
  94. pw_malloc_freelist/
  95. pw_malloc_freertos/
  96. pw_metric/
  97. pw_minimal_cpp_stdlib/
  98. pw_module/
  99. pw_multibuf/
  100. pw_multisink/
  101. pw_package/
  102. pw_perf_test/
  103. pw_persistent_ram/
  104. pw_polyfill/
  105. pw_preprocessor/
  106. pw_presubmit/
  107. pw_protobuf/
  108. pw_protobuf_compiler/
  109. pw_random/
  110. pw_result/
  111. pw_ring_buffer/
  112. pw_router/
  113. pw_rpc/
  114. pw_rpc_transport/
  115. pw_rust/
  116. pw_snapshot/
  117. pw_software_update/
  118. pw_span/
  119. pw_spi/
  120. pw_spi_mcuxpresso/
  121. pw_spi_rp2040/
  122. pw_status/
  123. pw_stm32cube_build/
  124. pw_stream/
  125. pw_stream_shmem_mcuxpresso/
  126. pw_stream_uart_linux/
  127. pw_stream_uart_mcuxpresso/
  128. pw_string/
  129. pw_symbolizer/
  130. pw_sync/
  131. pw_sync_baremetal/
  132. pw_sync_embos/
  133. pw_sync_freertos/
  134. pw_sync_stl/
  135. pw_sync_threadx/
  136. pw_sync_zephyr/
  137. pw_sys_io/
  138. pw_sys_io_ambiq_sdk/
  139. pw_sys_io_arduino/
  140. pw_sys_io_baremetal_lm3s6965evb/
  141. pw_sys_io_baremetal_stm32f429/
  142. pw_sys_io_emcraft_sf2/
  143. pw_sys_io_mcuxpresso/
  144. pw_sys_io_rp2040/
  145. pw_sys_io_stdio/
  146. pw_sys_io_stm32cube/
  147. pw_sys_io_zephyr/
  148. pw_system/
  149. pw_target_runner/
  150. pw_thread/
  151. pw_thread_embos/
  152. pw_thread_freertos/
  153. pw_thread_stl/
  154. pw_thread_threadx/
  155. pw_thread_zephyr/
  156. pw_tls_client/
  157. pw_tls_client_boringssl/
  158. pw_tls_client_mbedtls/
  159. pw_tokenizer/
  160. pw_toolchain/
  161. pw_toolchain_bazel/
  162. pw_trace/
  163. pw_trace_tokenized/
  164. pw_transfer/
  165. pw_uart/
  166. pw_unit_test/
  167. pw_unit_test_zephyr/
  168. pw_varint/
  169. pw_watch/
  170. pw_web/
  171. pw_work_queue/
  172. seed/
  173. targets/
  174. third_party/
  175. ts/
  176. zephyr/
  177. .bazelignore
  178. .bazelrc
  179. .black.toml
  180. .clang-format
  181. .clang-tidy
  182. .eslintrc.cjs
  183. .git-blame-ignore-revs
  184. .gitattributes
  185. .gitignore
  186. .gn
  187. .mypy.ini
  188. .prettierignore
  189. .prettierrc.cjs
  190. .pw_ide.yaml
  191. .pylintrc
  192. activate.bat
  193. Android.bp
  194. AUTHORS
  195. bootstrap.bat
  196. bootstrap.sh
  197. BUILD.bazel
  198. BUILD.gn
  199. BUILDCONFIG.gn
  200. CMakeLists.txt
  201. jest.config.ts
  202. Kconfig.zephyr
  203. LICENSE
  204. modules.gni
  205. OWNERS
  206. package-lock.json
  207. package.json
  208. pigweed.json
  209. PIGWEED_MODULES
  210. README.md
  211. rollup.config.js
  212. tsconfig.json
  213. WORKSPACE
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/.

Links