mirror of
				https://git.wownero.com/wownero/wownero.git
				synced 2024-08-15 01:03:23 +00:00 
			
		
		
		
	Update slow-hash.c
1. Fix for Mac OSX compilation errors.
This commit is contained in:
		
							parent
							
								
									05a5c62fe8
								
							
						
					
					
						commit
						e12ccdf905
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -303,9 +303,14 @@ void slow_hash_allocate_state(void)
 | 
			
		|||
    SetLockPagesPrivilege(GetCurrentProcess(), TRUE);
 | 
			
		||||
    hp_state = (uint8_t *) VirtualAlloc(hp_state, MEMORY, MEM_LARGE_PAGES |
 | 
			
		||||
                                        MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
 | 
			
		||||
#else
 | 
			
		||||
#if defined(__APPLE__)
 | 
			
		||||
    hp_state = mmap(0, MEMORY, PROT_READ | PROT_WRITE,
 | 
			
		||||
                    MAP_PRIVATE | MAP_ANON, 0, 0);    
 | 
			
		||||
#else
 | 
			
		||||
    hp_state = mmap(0, MEMORY, PROT_READ | PROT_WRITE,
 | 
			
		||||
                    MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, 0, 0);
 | 
			
		||||
#endif
 | 
			
		||||
    if(hp_state == MAP_FAILED)
 | 
			
		||||
        hp_state = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue