From 2d309a2cff4754c381353a73872a55b20b1a8019 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Wed, 26 Mar 2025 21:35:18 +0100 Subject: Separate allocator from memory --- asl/containers/BUILD.bazel | 3 +++ asl/memory/BUILD.bazel | 13 ++++++++++++- asl/types/BUILD.bazel | 2 ++ todo.txt | 3 +-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/asl/containers/BUILD.bazel b/asl/containers/BUILD.bazel index a8d6b4e..ba9c6f1 100644 --- a/asl/containers/BUILD.bazel +++ b/asl/containers/BUILD.bazel @@ -13,6 +13,7 @@ cc_library( ], deps = [ "//asl/memory", + "//asl/memory:allocator", "//asl/base", "//asl/types:span", "//asl/hashing", @@ -28,6 +29,7 @@ cc_library( deps = [ "//asl/base", "//asl/memory", + "//asl/memory:allocator", "//asl/types:maybe_uninit", "//asl/hashing", ], @@ -42,6 +44,7 @@ cc_library( deps = [ "//asl/base", "//asl/memory", + "//asl/memory:allocator", "//asl/hashing", ":hash_set", ], diff --git a/asl/memory/BUILD.bazel b/asl/memory/BUILD.bazel index 7305da0..83dcfd0 100644 --- a/asl/memory/BUILD.bazel +++ b/asl/memory/BUILD.bazel @@ -9,15 +9,26 @@ package( cc_library( name = "memory", hdrs = [ - "allocator.hpp", "layout.hpp", "memory.hpp", ], + deps = [ + "//asl/base", + ], + visibility = ["//visibility:public"], +) + +cc_library( + name = "allocator", + hdrs = [ + "allocator.hpp", + ], srcs = [ "allocator.cpp", ], deps = [ "//asl/base", + "//asl/memory", ], visibility = ["//visibility:public"], ) diff --git a/asl/types/BUILD.bazel b/asl/types/BUILD.bazel index 53905a3..16a2a7a 100644 --- a/asl/types/BUILD.bazel +++ b/asl/types/BUILD.bazel @@ -14,6 +14,7 @@ cc_library( deps = [ "//asl/base", "//asl/memory", + "//asl/memory:allocator", "//asl/hashing", ], visibility = ["//visibility:public"], @@ -86,6 +87,7 @@ cc_library( deps = [ "//asl/base", "//asl/memory", + "//asl/memory:allocator", ], visibility = ["//visibility:public"], ) diff --git a/todo.txt b/todo.txt index 1823626..8a1d00b 100644 --- a/todo.txt +++ b/todo.txt @@ -1,2 +1 @@ -Separate memory and allocator -Add invoke_t & co +Add invoke_r & co -- cgit