CSPspEmu.Hle.Managers.HleMemoryManager.GetPartition C# (CSharp) Method

GetPartition() public method

public GetPartition ( MemoryPartitions Partition ) : MemoryPartition
Partition MemoryPartitions
return MemoryPartition
        public MemoryPartition GetPartition(MemoryPartitions Partition)
        {
            return MemoryPartitionsUid.Get((int)Partition);
        }

Usage Example

            public void Init(HleThreadManager ThreadManager, PspMemory PspMemory, HleMemoryManager MemoryManager)
            {
                var BlockType = Attributes.HasFlag(MsgPipeAttributes.UseHighAddress)
                    ? MemoryPartition.Anchor.High
                    : MemoryPartition.Anchor.Low
                ;

                this.ThreadManager = ThreadManager;
                this.PspMemory = PspMemory;
                this.PoolPartition = MemoryManager.GetPartition(PartitionId).Allocate(
                    Size,
                    BlockType,
                    Alignment: 16,
                    Name: "<MsgPipe> : " + Name
                );
            }