Closed GoogleCodeExporter closed 9 years ago
Original comment by konstant...@gmail.com
on 18 Oct 2013 at 2:20
Partially fixed in http://llvm.org/viewvc/llvm-project?rev=192980&view=rev
needs more investigation.
Original comment by konstant...@gmail.com
on 18 Oct 2013 at 3:14
If the quarantine_size is set to 1, everything seems fine now.
After running 300000 threads the process is ~60Mb.
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
static const int kNumThread = 1;
static const int kNumIter = 300000;
void *Thread(void *) { return 0; }
int main() {
for (int i = 0; i < kNumIter; i++) {
if ((i % 10000) == 0) printf("[%d]\n", i);
pthread_t t[kNumThread];
for (int j = 0; j < kNumThread; j++)
pthread_create(&t[j], 0, Thread, 0);
for (int j = 0; j < kNumThread; j++)
pthread_join(t[j], 0);
}
}
However with the default quarantine settings the process eats 1.6Gb after
300000 threads, which is still surprising.
at-exit stats:
03 (48): total: 14080 K allocs: 19351536 remains: 300000
18 (384): total: 64 K allocs: 128 remains: 128
25 (1280): total: 192 K allocs: 2478 remains: 54
37 (10240): total: 3000064 K allocs: 1050000 remains: 300000
Original comment by konstant...@gmail.com
on 21 Oct 2013 at 7:38
Should be fully fixed by
http://llvm.org/viewvc/llvm-project?rev=193072&view=rev
We needed to count the size of QuarantineBatch in the total Quarantine size
Original comment by konstant...@gmail.com
on 21 Oct 2013 at 8:43
Original issue reported on code.google.com by
dvyu...@google.com
on 18 Oct 2013 at 2:18