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)
		
			
				
	
	
		
			10 lines
		
	
	
		
			241 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			241 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
local defines and declarations 
 | 
						|
*/
 | 
						|
 | 
						|
extern unsigned char _binary_imgrd_mfs_start, _binary_imgrd_mfs_end;
 | 
						|
 | 
						|
#define	imgrd	&_binary_imgrd_mfs_start
 | 
						|
#define	imgrd_size \
 | 
						|
	(((size_t) &_binary_imgrd_mfs_end - (size_t)&_binary_imgrd_mfs_start))
 |