(Windows) Free memory is now queried with GlobalMemoryStatus, so GrafX2 can be used on ...DOS with HX extender.
The result now tops at 4Gb free physical. Previously it would wrap, causing problems if you were extremely unlucky. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@629 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									d704c4f425
								
							
						
					
					
						commit
						108b887f07
					
				
							
								
								
									
										8
									
								
								divers.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								divers.c
									
									
									
									
									
								
							@ -643,10 +643,10 @@ unsigned long Memoire_libre(void)
 | 
			
		||||
    // ever becomes full and you're still saying there are 10MB free here, the
 | 
			
		||||
    // program will crash without saving any picture backup ! You've been warned...
 | 
			
		||||
    #if defined(__WIN32__)
 | 
			
		||||
        MEMORYSTATUSEX mstt;
 | 
			
		||||
        mstt.dwLength = sizeof(MEMORYSTATUSEX);
 | 
			
		||||
        GlobalMemoryStatusEx(&mstt);
 | 
			
		||||
        return mstt.ullAvailPhys;
 | 
			
		||||
        MEMORYSTATUS mstt;
 | 
			
		||||
        mstt.dwLength = sizeof(MEMORYSTATUS);
 | 
			
		||||
        GlobalMemoryStatus(&mstt);
 | 
			
		||||
        return mstt.dwAvailPhys;
 | 
			
		||||
    #elif defined(__macosx__) || defined(__FreeBSD__)
 | 
			
		||||
        int mib[2];
 | 
			
		||||
        int maxmem;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user