aboutsummaryrefslogtreecommitdiff
path: root/common/errors/memory
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-25 06:09:23 +0530
committerBobby <[email protected]>2026-02-25 06:09:23 +0530
commitbd462bccea2a637486f863a6342b9870b35c69aa (patch)
treec68dc848542f53b701c553bd0124874948598c8d /common/errors/memory
parent313ab7ea7d5a5d902005d8543ab6b323ed948048 (diff)
downloadakiba-bd462bccea2a637486f863a6342b9870b35c69aa.tar.xz
akiba-bd462bccea2a637486f863a6342b9870b35c69aa.zip
feat: Add common constants, errors, and serial driver functionality
Diffstat (limited to 'common/errors/memory')
-rw-r--r--common/errors/memory/allocation.zig9
-rw-r--r--common/errors/memory/mapping.zig11
-rw-r--r--common/errors/memory/memory.zig7
3 files changed, 27 insertions, 0 deletions
diff --git a/common/errors/memory/allocation.zig b/common/errors/memory/allocation.zig
new file mode 100644
index 0000000..2359cac
--- /dev/null
+++ b/common/errors/memory/allocation.zig
@@ -0,0 +1,9 @@
+//! Memory Allocation Errors
+
+pub const AllocationError = error{
+ OutOfMemory,
+ InvalidSize,
+ InvalidAlignment,
+ RegionExhausted,
+ ZoneExhausted,
+};
diff --git a/common/errors/memory/mapping.zig b/common/errors/memory/mapping.zig
new file mode 100644
index 0000000..3f24216
--- /dev/null
+++ b/common/errors/memory/mapping.zig
@@ -0,0 +1,11 @@
+//! Memory Mapping Errors
+
+pub const MappingError = error{
+ InvalidAddress,
+ AddressNotAligned,
+ RegionOverlap,
+ PermissionDenied,
+ PageTableAllocationFailed,
+ AlreadyMapped,
+ NotMapped,
+};
diff --git a/common/errors/memory/memory.zig b/common/errors/memory/memory.zig
new file mode 100644
index 0000000..de76bf2
--- /dev/null
+++ b/common/errors/memory/memory.zig
@@ -0,0 +1,7 @@
+//! Memory Errors
+
+pub const allocation = @import("allocation.zig");
+pub const mapping = @import("mapping.zig");
+
+pub const AllocationError = allocation.AllocationError;
+pub const MappingError = mapping.MappingError;