summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2024-01-30 13:46:01 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2024-01-31 16:38:51 +0100
commitaaab11e36f55f6b06f08b10aeca4b14f112914ee (patch)
tree8a9ee6cafe07cbd4123b8490cc181e945011d78c /src/core/hle/service/nvdrv
parentsmmu: use new range mutex construction for protecting counters (diff)
downloadyuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar.gz
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar.bz2
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar.lz
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar.xz
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.tar.zst
yuzu-aaab11e36f55f6b06f08b10aeca4b14f112914ee.zip
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r--src/core/hle/service/nvdrv/core/container.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/core/container.cpp b/src/core/hle/service/nvdrv/core/container.cpp
index dc1b4d5be..e89cca6f2 100644
--- a/src/core/hle/service/nvdrv/core/container.cpp
+++ b/src/core/hle/service/nvdrv/core/container.cpp
@@ -83,7 +83,9 @@ SessionId Container::OpenSession(Kernel::KProcess* process) {
// Check if this memory block is heap.
if (svc_mem_info.state == Kernel::Svc::MemoryState::Normal) {
- if (svc_mem_info.size > region_size) {
+ if (region_start + region_size == svc_mem_info.base_address) {
+ region_size += svc_mem_info.size;
+ } else if (svc_mem_info.size > region_size) {
region_size = svc_mem_info.size;
region_start = svc_mem_info.base_address;
}