mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	AK: Make Bitmap construction OOM-fallible
This commit is contained in:
		
							parent
							
								
									1667a80ade
								
							
						
					
					
						commit
						871a53db76
					
				
					 6 changed files with 44 additions and 32 deletions
				
			
		|  | @ -12,14 +12,14 @@ namespace Kernel::Memory { | |||
| InodeVMObject::InodeVMObject(Inode& inode, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages) | ||||
|     : VMObject(move(new_physical_pages)) | ||||
|     , m_inode(inode) | ||||
|     , m_dirty_pages(page_count(), false) | ||||
|     , m_dirty_pages(Bitmap::try_create(page_count(), false).release_value_but_fixme_should_propagate_errors()) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| InodeVMObject::InodeVMObject(InodeVMObject const& other, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages) | ||||
|     : VMObject(move(new_physical_pages)) | ||||
|     , m_inode(other.m_inode) | ||||
|     , m_dirty_pages(page_count(), false) | ||||
|     , m_dirty_pages(Bitmap::try_create(page_count(), false).release_value_but_fixme_should_propagate_errors()) | ||||
| { | ||||
|     for (size_t i = 0; i < page_count(); ++i) | ||||
|         m_dirty_pages.set(i, other.m_dirty_pages.get(i)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Idan Horowitz
						Idan Horowitz