Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::bad_alloc #1

Open
WithHades opened this issue Feb 13, 2020 · 0 comments
Open

std::bad_alloc #1

WithHades opened this issue Feb 13, 2020 · 0 comments

Comments

@WithHades
Copy link

When I run the plz77_1.exe to compress the data of chr22.dna, the program runs a error:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

I debug the code and find out the error happend in the rangeMin.cpp:
line 39 to line 41:
parallel_for(intT i=0;i<depth;i++) {
table[i] = new intT[n];
}

when the error is occured, the depth is 21 and the n is 23035842.
I run the code:
int main()
{
int** table = new int*[21];
for (int i = 0; i < 21; i++) {
table[i] = new int[23035842];
}
return 0;
}
it's ok.
So I think this error is related to memory leak, but I checked the code and released the applied objects, the problem is still unresolved.

Can you help me solve this problem?
thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant