File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2041,8 +2041,12 @@ static BLASULONG alloc_lock = 0UL;
2041
2041
2042
2042
static void alloc_mmap_free (struct release_t * release ){
2043
2043
2044
+ if (!release -> address ) return 0 ;
2045
+
2044
2046
if (munmap (release -> address , BUFFER_SIZE )) {
2045
- printf ("OpenBLAS : munmap failed\n" );
2047
+ int errsv = errno ;
2048
+ perror ("OpenBLAS : munmap failed:" );
2049
+ printf ("error code=%d,\trelease->address=%lx\n" ,errsv ,release -> address );
2046
2050
}
2047
2051
}
2048
2052
@@ -2073,6 +2077,12 @@ static void *alloc_mmap(void *address){
2073
2077
#if (defined(SMP ) || defined(USE_LOCKING )) && !defined(USE_OPENMP )
2074
2078
UNLOCK_COMMAND (& alloc_lock );
2075
2079
#endif
2080
+ } else {
2081
+ #ifdef DEBUG
2082
+ int errsv = errno ;
2083
+ perror ("OpenBLAS : mmap failed:" );
2084
+ printf ("error code=%d,\tmap_address=%lx\n" ,errsv ,map_address );
2085
+ #endif
2076
2086
}
2077
2087
2078
2088
#ifdef OS_LINUX
You can’t perform that action at this time.
0 commit comments