SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
29.64k stars 3.15k forks source link

Kernel/Memory: Remove duplicate code in try_create_purgeable_with_size() #24640

Closed brody-qq closed 4 days ago

brody-qq commented 5 days ago

The methods try_create_with_size() and try_create_purgeable_with_size() on AnonymousVMObject are almost identical, other than one member that gets set (m_purgeable).

This PR makes try_create_purgeable_with_size() call try_create_with_size() so that both methods re-use the same code.