kernel/vm: Fix and reactivate VMAnonymousNoSwapCache::Merge.

It seems this method was never renamed when MergeStore was renamed
to Merge all the way back in hrev27179. However, that wound up
working out, because this method also didn't call the base class
implementation that actually merges the page trees properly, so
it wouldn't have worked anyway.
This commit is contained in:
Augustin Cavalier
2024-12-11 14:17:14 -05:00
parent f8c3cc3459
commit 12be2aa0b3
2 changed files with 6 additions and 4 deletions
@@ -165,17 +165,17 @@ VMAnonymousNoSwapCache::Fault(struct VMAddressSpace* aspace, off_t offset)
void
VMAnonymousNoSwapCache::MergeStore(VMCache* _source)
VMAnonymousNoSwapCache::Merge(VMCache* _source)
{
VMAnonymousNoSwapCache* source
= dynamic_cast<VMAnonymousNoSwapCache*>(_source);
if (source == NULL) {
panic("VMAnonymousNoSwapCache::MergeStore(): merge with incompatible "
panic("VMAnonymousNoSwapCache::Merge(): merge with incompatible "
"cache %p requested", _source);
return;
}
// take over the source' committed size
// take over the source's committed size
committed_size += source->committed_size;
source->committed_size = 0;
@@ -184,6 +184,8 @@ VMAnonymousNoSwapCache::MergeStore(VMCache* _source)
vm_unreserve_memory(committed_size - actualSize);
committed_size = actualSize;
}
VMCache::Merge(source);
}
@@ -39,7 +39,7 @@ public:
virtual status_t Fault(struct VMAddressSpace* aspace,
off_t offset);
virtual void MergeStore(VMCache* source);
virtual void Merge(VMCache* source);
protected:
virtual void DeleteObject();