mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	LibCore: Make MappedFile OwnPtr-based
Since it will become a stream in a little bit, it should behave like all non-trivial stream classes, who are not primarily intended to have shared ownership to make closing behavior more predictable. Across all uses of MappedFile, there is only one use case of shared mapped files in LibVideo, which now uses the thin SharedMappedFile wrapper.
This commit is contained in:
		
							parent
							
								
									5b2496e522
								
							
						
					
					
						commit
						062e0db46c
					
				
					 32 changed files with 80 additions and 64 deletions
				
			
		|  | @ -29,7 +29,8 @@ static ELF::Image* try_load_kernel_binary() | |||
|     auto kernel_binary_or_error = Core::MappedFile::map("/boot/Kernel"sv); | ||||
|     if (!kernel_binary_or_error.is_error()) { | ||||
|         auto kernel_binary = kernel_binary_or_error.release_value(); | ||||
|         s_kernel_binary = { { kernel_binary, ELF::Image(kernel_binary->bytes()) } }; | ||||
|         auto image = ELF::Image(kernel_binary->bytes()); | ||||
|         s_kernel_binary = { { move(kernel_binary), image } }; | ||||
|         return &s_kernel_binary->elf; | ||||
|     } | ||||
|     return nullptr; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kleines Filmröllchen
						kleines Filmröllchen