diff --git a/includes/std/mem.pat b/includes/std/mem.pat index 6f2f9b1..0bf4629 100644 --- a/includes/std/mem.pat +++ b/includes/std/mem.pat @@ -2,6 +2,8 @@ namespace std::mem { + using Section = u128; + enum Endian : u8 { Native = 0, Big = 1, @@ -48,6 +50,28 @@ namespace std::mem { }; + fn create_section(str name) { + return builtin::std::mem::create_section(name); + }; + + fn delete_section(Section section) { + builtin::std::mem::delete_section(section); + }; + + fn get_section_size(Section section) { + return builtin::std::mem::get_section_size(section); + }; + + fn copy_section_to_section(Section from_section, u64 from_address, Section to_section, u64 to_address, u64 size) { + return builtin::std::mem::get_section_size(from_section, from_address, to_section, to_address, size); + }; + + fn copy_value_to_section(ref auto value, Section to_section, u64 to_address) { + return builtin::std::mem::copy_value_to_section(value, to_section, to_address); + }; + + + struct MagicSearch { if ($ < (std::mem::size() - std::string::length(Magic) - 1)) { char __potentialMagic__[std::string::length(Magic)] [[hidden, no_unique_address]];