Atmosphere/libraries/libmesosphere/source
Michael Scire b7ec64ea16 fs.mitm: add and use memlet module to temporarily steal applet memory while building romfs images.
Starting in 20.0.0, the browser needs more applet memory to function, so we can't steal as much any more.
Thus, we now steal 14 MB on 20.0.0+ instead of 40MB.

However, since this reduces memory available for custom system modules, we are adjusting to compensate.
ams.mitm's heap size has been reduced from 32MB to 12MB (recovering 20MB).
In addition, fs.mitm now uses a new mechanism for stealing memory from the applet pool while romfs is being built.

On net, we are compromising:
    * Custom sysmodules lose memory available to them.
        On 19.0.0/AMS 1.8.0, there was 30 MB available for custom sysmodules.
        Stealing 14 MB instead of 40 MB, we lose 26 MB of that. Reducing ams.mitm's usage will gain us back 20.
        Nintendo also appears to...use 4 extra MB, in 20.0.0, from my test homebrew.
        So on 20.0.0/AMS 1.9.0, there should be 20 MB available for custom sysmodules.
        On the bright side, on <20.0.0/AMS 1.9.0, I guess there will be 50 MB available for custom sysmodules now?
    * totk mods will lose the ability to...put every file in the romfs on sd card. There will be some unknown maximum filecount for totk mods.
        On the bright side, implementing the transient memory stealing should improve compatibility for some mods which strictly add files?
2025-05-09 11:55:21 -07:00
..
arch kern: plutoo is an intellectual, I am a fool, fix chicanery 2025-05-09 11:55:21 -07:00
board fs.mitm: add and use memlet module to temporarily steal applet memory while building romfs images. 2025-05-09 11:55:21 -07:00
init kern: implement support for applying relr relocations 2023-10-12 08:55:58 -07:00
libc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
svc kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_debug_log.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_debug_log_impl.arch.arm64.s kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_debug_log_impl.board.nintendo_nx.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_debug_log_impl.board.qemu_virt.cpp kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_debug_log_impl.hpp kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_initial_process.cpp kern: take alignment argument in KMemoryManager::AllocateAndOpen 2024-03-29 02:41:14 -07:00
kern_k_address_arbiter.cpp kern/svc: update WaitForAddress to support 64-bit WaitIfEqual 2024-10-15 21:48:59 -07:00
kern_k_address_space_info.cpp kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_k_capabilities.cpp kern/strat: update for new DebugFlags capability semantics 2024-10-15 21:48:59 -07:00
kern_k_class_token.cpp kern: implement K(Secure)SystemResource 2022-10-12 09:15:16 -07:00
kern_k_client_port.cpp kern: fix various comment/style hygiene issues (thanks @liamwhite) 2023-12-27 23:24:35 -07:00
kern_k_client_session.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_code_memory.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_condition_variable.cpp kern: refactor priority inheritance to represent locks as C++ objects 2023-02-22 17:19:51 -08:00
kern_k_debug_base.cpp kern/strat: update for new DebugFlags capability semantics 2024-10-15 21:48:59 -07:00
kern_k_device_address_space.cpp kern: update for new device map semantics 2022-10-12 09:15:16 -07:00
kern_k_dpc_manager.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_dump_object.cpp kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:16 -07:00
kern_k_event.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_handle_table.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_initial_process_reader.cpp kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_k_interrupt_event.cpp kern: merge/simplify KInterruptEventTask into KInterruptEvent 2022-10-12 09:15:16 -07:00
kern_k_interrupt_task_manager.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_io_pool.cpp kern: use tree for IoPool regions instead of list 2023-02-22 17:19:51 -08:00
kern_k_io_pool.unsupported.inc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_io_region.cpp kern: update UnmapIoRegion for new Mapping_Memory handling 2023-02-22 17:19:51 -08:00
kern_k_light_client_session.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_light_condition_variable.cpp kern: fix stray addressof operator 2023-03-08 09:46:38 -07:00
kern_k_light_lock.cpp kern: refactor priority inheritance to represent locks as C++ objects 2023-02-22 17:19:51 -08:00
kern_k_light_server_session.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_light_session.cpp kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
kern_k_memory_block_manager.cpp kern: refactor FindFreeArea region search logic per 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_k_memory_layout.board.nintendo_nx.cpp kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-23 09:10:50 -07:00
kern_k_memory_layout.board.qemu_virt.cpp kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-23 09:10:50 -07:00
kern_k_memory_layout.cpp kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:16 -07:00
kern_k_memory_manager.cpp kern: add minimum alignment support to KMemoryManager 2024-10-15 21:48:59 -07:00
kern_k_object_name.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_page_group.cpp kern: add KPageGroup::CopyRangeTo 2024-03-29 02:41:14 -07:00
kern_k_page_heap.cpp kern: implement additional randomness in KPageHeap allocations 2022-03-23 09:10:50 -07:00
kern_k_page_table_base.cpp kern: refactor FindFreeArea region search logic per 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_k_port.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_process.cpp kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
kern_k_readable_event.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_resource_limit.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_scheduler.cpp kern: refactor priority inheritance to represent locks as C++ objects 2023-02-22 17:19:51 -08:00
kern_k_scoped_disable_dispatch.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_server_port.cpp kern: fix various comment/style hygiene issues (thanks @liamwhite) 2023-12-27 23:24:35 -07:00
kern_k_server_session.cpp kern: fix various comment/style hygiene issues (thanks @liamwhite) 2023-12-27 23:24:35 -07:00
kern_k_session.cpp kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
kern_k_session_request.cpp kern: use slab allocated KSessionRequest dynamic mappings 2022-10-12 09:15:16 -07:00
kern_k_shared_memory.cpp kern: take alignment argument in KMemoryManager::AllocateAndOpen 2024-03-29 02:41:14 -07:00
kern_k_synchronization_object.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_system_control_base.cpp kern: invert meaning of KTargetSystem/KSystemControl bools 2025-05-09 11:55:21 -07:00
kern_k_system_resource.cpp kern: support null resource limit in KSecureSystemResource 2025-05-09 11:55:21 -07:00
kern_k_thread.cpp kern: continue page table refactor, implement separate/unmap 2024-10-15 21:48:59 -07:00
kern_k_thread_local_page.cpp kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:16 -07:00
kern_k_thread_queue.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_trace.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_transfer_memory.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_unused_slab_memory.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_wait_object.cpp Integrate new result macros. (#1780) 2022-02-14 14:45:32 -08:00
kern_k_worker_task_manager.cpp kern: devirtualize KReadableEvent::Reset, KWorkerTask::DoWorkerTask 2021-10-24 20:41:38 -07:00
kern_kernel.cpp kern: reorder resource manager implementation 2025-05-09 11:55:21 -07:00
kern_main.cpp kern: add minimum alignment support to KMemoryManager 2024-10-15 21:48:59 -07:00
kern_panic.cpp kern: print kernel backtrace on panic 2022-03-23 09:10:50 -07:00