aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/MemoryRegions.cs
blob: 198c621cccecdd02adff1636c15d7dee45ae5b08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using ChocolArm64.Memory;

namespace Ryujinx.HLE.OsHle
{
    static class MemoryRegions
    {
        public const long AddrSpaceStart = 0x08000000;

        public const long MapRegionAddress = 0x10000000;
        public const long MapRegionSize    = 0x20000000;

        public const long HeapRegionAddress = MapRegionAddress + MapRegionSize;
        public const long HeapRegionSize    = TlsPagesAddress - HeapRegionAddress;

        public const long MainStackSize = 0x100000;

        public const long MainStackAddress = AMemoryMgr.AddrSize - MainStackSize;

        public const long TlsPagesSize = 0x20000;

        public const long TlsPagesAddress = MainStackAddress - TlsPagesSize;

        public const long TotalMemoryUsed = HeapRegionAddress + TlsPagesSize + MainStackSize;

        public const long TotalMemoryAvailable = AMemoryMgr.RamSize - AddrSpaceStart;

        public const long AddrSpaceSize = AMemoryMgr.AddrSize - AddrSpaceStart;
    }
}