 ed1af3c86c
			
		
	
	
		ed1af3c86c
		
	
	
	
	
		
			
			complete munmap implementation; single-page references made a general munmap() implementation possible to write cleanly. . memory: let the MIOCRAMSIZE ioctl set the imgrd device size (but only to 0) . let the ramdisk command set sizes to 0 . use this command to set /dev/imgrd to 0 after mounting /usr in /etc/rc, so the boot time ramdisk is freed (about 4MB currently)
		
			
				
	
	
		
			25 lines
		
	
	
		
			578 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			578 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* This file contains memory management routines for RS.
 | |
|  *
 | |
|  * Changes:
 | |
|  *   Nov 22, 2009: Created    (Cristiano Giuffrida)
 | |
|  */
 | |
| 
 | |
| #include "inc.h"
 | |
| 
 | |
| #define minix_munmap _minix_munmap
 | |
| #include <sys/mman.h>
 | |
| #undef minix_munmap
 | |
| 
 | |
| int unmap_ok = 0;
 | |
| 
 | |
| /*===========================================================================*
 | |
|  *				    minix_munmap            		     *
 | |
|  *===========================================================================*/
 | |
| int minix_munmap(void *addrstart, vir_bytes len)
 | |
| {
 | |
|   if(!unmap_ok) 
 | |
|       return ENOSYS;
 | |
| 
 | |
|   return _minix_munmap(addrstart, len);
 | |
| }
 |