pub fn calculate(shim: Line<usize>, code: Line<usize>) -> Self {
        assert_eq!(shim.start, 0);

        let shim: Line<usize> = above(
            Span {
                start: bytes!(32; TiB) + bytes!(63;GiB),
                count: 0,
            },
            Span::from(shim).count,
        )
        .into();

        let enclave = Line::from(Span {
            start: lower(shim.end, SIZE),
            count: SIZE,
        });

        assert!(enclave.contains(&shim.start));
        assert!(enclave.contains(&shim.end));
        assert_eq!(code.start, 0);

        let prefix = Span {
            start: enclave.start,
            count: PREFIX,
        }
        .into();
        let code = above(prefix, Span::from(code).count);
        let heap = above(code, HEAP);
        let stack = below(shim, STACK);

        Self {
            enclave,

            prefix,
            code: code.into(),
            heap: heap.into(),
            stack: stack.into(),
            shim,
        }
    }
/// Calculate the memory layout of the SGX keep
Calculate the memory layout of the SGX keep
Calculate the memory layout of the SGX keep
pub fn calculate(shim: Line<usize>, code: Line<usize>) -> Self {
        assert_eq!(shim.start, 0);
        let shim: Line<usize> = above(
            Span {
                start: bytes!(32; TiB) + bytes!(63;GiB),
                count: 0,
            },
            Span::from(shim).count,
        )
        .into();
        let enclave = Line::from(Span {
            start: lower(shim.end, SIZE),
            count: SIZE,
        });
        assert!(enclave.contains(&shim.start));
        assert!(enclave.contains(&shim.end));
        assert_eq!(code.start, 0);
        let prefix = Span {
            start: enclave.start,
            count: PREFIX,
        }
        .into();
        let code = above(prefix, Span::from(code).count);
        let heap = above(code, HEAP);
        let stack = below(shim, STACK);
        Self {
            enclave,
            prefix,
            code: code.into(),
            heap: heap.into(),
            stack: stack.into(),
            shim,
        }
    }
pub fn calculate ( shim : Line < usize > , code : Line < usize > ) -> Self { assert_eq ! ( shim start 0 ) ; let shim : Line < usize > = above ( Span { start : bytes ! ( 32 TiB ) + bytes ! ( 63 GiB ) , count : 0 , } , Span :: from ( shim ) . count , ) . into ( ) ; let enclave = Line :: from ( Span { start : lower ( shim . end , SIZE ) , count : SIZE , } ) ; assert ! ( enclave contains ( shim start ) ) ; assert ! ( enclave contains ( shim end ) ) ; assert_eq ! ( code start 0 ) ; let prefix = Span { start : enclave . start , count : PREFIX , } . into ( ) ; let code = above ( prefix , Span :: from ( code ) . count ) ; let heap = above ( code , HEAP ) ; let stack = below ( shim , STACK ) ; Self { enclave , prefix , code : code . into ( ) , heap : heap . into ( ) , stack : stack . into ( ) , shim , } }
Calculate the memory layout of the SGX keep
Calculate the memory layout of the SGX keep
shim
Line<usize>
code
Line<usize>
shim
Line<usize>
code
Line<usize>