exec now uses phys_zero system call to zero bss segments (instead of
using phys_copy to copy zeroes there for every kb), which is a big optimisation in some cases fixed a bug that was introduced when function keys became notifies
This commit is contained in:
		
							parent
							
								
									c977bd8709
								
							
						
					
					
						commit
						447b988154
					
				| @ -24,12 +24,21 @@ FORWARD _PROTOTYPE( void mproc_dmp, (void)); | ||||
| PUBLIC int do_fkey_pressed(void) | ||||
| { | ||||
|   printf("Process Manager debug dump: "); | ||||
|   switch (m_in.FKEY_CODE) { | ||||
| #if DEAD_CODE | ||||
|   switch (m_in.FKEY_NUM) { | ||||
| #else | ||||
|   switch (m_in.NOTIFY_FLAGS) { | ||||
| #endif | ||||
|     	case SF7:	mproc_dmp();		break; | ||||
| 
 | ||||
|     	default: | ||||
| #if DEAD_CODE | ||||
|     		printf("PM: unhandled notification for Shift+F%d key.\n", | ||||
|     			m_in.FKEY_NUM); | ||||
| #else | ||||
|     		printf("PM: unhandled notification for Shift+F%d key.\n", | ||||
|     			m_in.NOTIFY_FLAGS); | ||||
| #endif | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -297,7 +297,6 @@ phys_bytes tot_bytes;		/* total memory to allocate, including gap */ | ||||
|   register struct mproc *rmp; | ||||
|   vir_clicks text_clicks, data_clicks, gap_clicks, stack_clicks, tot_clicks; | ||||
|   phys_clicks new_base; | ||||
|   static char zero[1024];		/* used to zero bss */ | ||||
|   phys_bytes bytes, base, count, bss_offset; | ||||
|   int s; | ||||
| 
 | ||||
| @ -372,7 +371,13 @@ phys_bytes tot_bytes;		/* total memory to allocate, including gap */ | ||||
|   base += bss_offset; | ||||
|   bytes -= bss_offset; | ||||
| 
 | ||||
|   if ((s=sys_physzero(base, bytes)) != OK) { | ||||
| 	panic("new_mem can't zero", s); | ||||
|   } | ||||
| 
 | ||||
| #if DEAD_CODE | ||||
|   while (bytes > 0) { | ||||
|   	static char zero[1024];		/* used to zero bss */ | ||||
| 	count = MIN(bytes, (phys_bytes) sizeof(zero)); | ||||
| 	if ((s=sys_physcopy(PM_PROC_NR, D, (phys_bytes) zero, | ||||
| 				NONE, PHYS_SEG, base, count)) != OK) { | ||||
| @ -381,6 +386,8 @@ phys_bytes tot_bytes;		/* total memory to allocate, including gap */ | ||||
| 	base += count; | ||||
| 	bytes -= count; | ||||
|   } | ||||
| #endif | ||||
| 
 | ||||
|   return(OK); | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ben Gras
						Ben Gras