Hi,

The code below is compiled with -fopenmp and run on FreeBSD6/7 (i386, amd64):

#include <omp.h>
#include <unistd.h>

int n = 4, m = 2;

int main () {
        for (;;) {
                int i;

                //sleep(2);
#pragma omp parallel for num_threads(m)
                for(i = 0; i < 1; i++) {}

                //sleep(2);
#pragma omp parallel for num_threads(n)
                for(i = 0; i < 1; i++) {}
                
        }

        return 0;
}

During the run the program's virtual memory usage constantly grows. The growth
is observed only when n != m. When running the program with uncommented
sleep() and observing the number of threads with 'top -H' I see in turn 2 or 4
threads. So it looks like memory leak when thread is removed. Should I fill
PR?

-- 
Mikolaj Golub
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to