Browse Source
Merge pull request #4451 from martin-frbg/overflow_reset
Reset "buffer management structure overflowed" state and free auxiliary struct on blas_shutdown
tags/v0.3.27
Martin Kroeker
GitHub
2 years ago
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
driver/others/memory.c
|
|
|
@@ -3214,7 +3214,7 @@ void blas_shutdown(void){ |
|
|
|
#endif |
|
|
|
memory[pos].lock = 0; |
|
|
|
} |
|
|
|
if (memory_overflowed) |
|
|
|
if (memory_overflowed) { |
|
|
|
for (pos = 0; pos < NEW_BUFFERS; pos ++){ |
|
|
|
newmemory[pos].addr = (void *)0; |
|
|
|
newmemory[pos].used = 0; |
|
|
|
@@ -3222,6 +3222,10 @@ void blas_shutdown(void){ |
|
|
|
newmemory[pos].pos = -1; |
|
|
|
#endif |
|
|
|
newmemory[pos].lock = 0; |
|
|
|
} |
|
|
|
free(newmemory); |
|
|
|
newmemory = NULL; |
|
|
|
memory_overflowed = 0; |
|
|
|
} |
|
|
|
|
|
|
|
UNLOCK_COMMAND(&alloc_lock); |
|
|
|
|