summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 11:01:41 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 11:06:30 +0100
commit6cc0c03a0b66ea55b246a86639a5329e4aac05dc (patch)
tree7ec815756c440eaaaee33895094db9024241ab0b /include
parent3192329b9b653d91fb19cb5cc497548801d9ee10 (diff)
feat: Add `placeable_callable_type` alias.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/LibC++/new.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/LibC++/new.h b/include/LibC++/new.h
index 9a7d7da..2c5715f 100644
--- a/include/LibC++/new.h
+++ b/include/LibC++/new.h
@@ -39,8 +39,12 @@ void* operator new[](size_t);
/// \brief placement_t new and delete operators. Governs how the memory shall be placed.
/// \note This is a feature that shall be used wisely, failure to do so will produce Undefined Behaviors at runtime.
-void* operator _placement_new(size_t);
-void operator _placement_delete(void*);
+void* operator _placement_new(struct placement_t*);
+void operator _placement_delete(struct placement_t*, void*);
+
+/// \brief For all offsets within the base range and alignement 'align'
+/// \brief Allocate offsets with respect to the `base` interval, apply alignement of `align` value. Return `offsets` of length n as an aligned value within the domain of `base`.
+using placeable_callable_type = void*/*offsets*/(*)(void* base, size_t n, const int& align);
/// \note This should NOT fail, failure to meet the conditions will cause the program's state to be aborted.
/// \brief Set the placement policy of future memory allocations.