I'm trying to allocate some memory but sometimes get error "out of memory". cudaMemGetInfo says that available more memory that I need. So, problem in memory fragmentation. Is it possible to fix this problem? Is it possible to place elements in memory not one by one and fragment to few peaces that I can place in memory?
Asked
Active
Viewed 873 times
1 Answers
3
If you get "out of memory" because of memory fragmentation, then there is some error in the way that you work with memory!! You are responsible for fragmenting that memory, consider a redesign of your program and for example use a pool of memory to avoid too much new/delete to avoid fragmenting memory
![](../../users/profiles/1425813.webp)
BigBoss
- 6,749
- 1
- 17
- 38
-
Is exist library that implements memory pool to CUDA? – Robotex Oct 13 '12 at 14:50
-
Sorry for late answer, take a look at `libhoard`. I don't remember the site but googling `libhoard` will help you. – BigBoss Oct 13 '12 at 14:57
-
I found this library but I found nothing about using it for CUDA device memory allocation. – Robotex Oct 15 '12 at 10:28