diff options
| author | Bobby <[email protected]> | 2026-02-25 06:09:23 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-25 06:09:23 +0530 |
| commit | bd462bccea2a637486f863a6342b9870b35c69aa (patch) | |
| tree | c68dc848542f53b701c553bd0124874948598c8d /common/errors/memory | |
| parent | 313ab7ea7d5a5d902005d8543ab6b323ed948048 (diff) | |
| download | akiba-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.zig | 9 | ||||
| -rw-r--r-- | common/errors/memory/mapping.zig | 11 | ||||
| -rw-r--r-- | common/errors/memory/memory.zig | 7 |
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; |
