Is it possible to solve CUDA memory fragmentation issue?

1.2k views Asked by At

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?

1

There are 1 answers

3
BigBoss On

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