Function fromLimits [src]

Create parameters from ops and mem limits, where mem_limit given in bytes

Prototype

pub fn fromLimits(ops_limit: u32, mem_limit: usize) Self

Parameters

ops_limit: u32mem_limit: usize

Source

pub fn fromLimits(ops_limit: u32, mem_limit: usize) Self { const m = mem_limit / 1024; std.debug.assert(m <= max_int); return .{ .t = ops_limit, .m = @as(u32, @intCast(m)), .p = 1 }; }