Beispiel #1
0
        internal Process(ASCIIString name, AndroidApplicationInfo appInfo)
        {
            Contract.Ensures(Credential.GhostOwner == this);
            Contract.Ensures(Space.GhostOwner == this);
            Contract.Ensures(Files.GhostOwner == this);

            this.AppInfo = appInfo;
            SFSFilePrefix = Util.StringToByteArray(appInfo.DataDir, false);

            this.Files = new FileDescriptorTable(this);

            const uint UTCB_BOTTOM = 0xc0000000;
            var utcb = new Pointer(UTCB_BOTTOM);

            // TODO: expose interface to change the name of the process
            var archAddressSpace = Arch.ArchAddressSpace.Create(name, utcb,
                Arch.ArchDefinition.UTCBSizeShift + Arch.ArchDefinition.MaxThreadPerTaskLog2);
            this.Space = new AddressSpace(this, archAddressSpace);
            this.Credential = SecurityManager.GetCredential(name, this);
        }
Beispiel #2
0
        internal Process(ASCIIString name, AndroidApplicationInfo appInfo)
        {
            Contract.Ensures(Credential.GhostOwner == this);
            Contract.Ensures(Space.GhostOwner == this);
            Contract.Ensures(Files.GhostOwner == this);

            this.AppInfo  = appInfo;
            SFSFilePrefix = Util.StringToByteArray(appInfo.DataDir, false);

            this.Files = new FileDescriptorTable(this);

            const uint UTCB_BOTTOM = 0xc0000000;
            var        utcb        = new Pointer(UTCB_BOTTOM);

            // TODO: expose interface to change the name of the process
            var archAddressSpace = Arch.ArchAddressSpace.Create(name, utcb,
                                                                Arch.ArchDefinition.UTCBSizeShift + Arch.ArchDefinition.MaxThreadPerTaskLog2);

            this.Space      = new AddressSpace(this, archAddressSpace);
            this.Credential = SecurityManager.GetCredential(name, this);
        }