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

Win32 Memory problem (bad allocation) #45

Open
svigerske opened this issue Mar 2, 2019 · 6 comments
Open

Win32 Memory problem (bad allocation) #45

svigerske opened this issue Mar 2, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: tomba

Original creation time: 2008-02-06 14:22:21

Version: 2.0.0

We are using CBC version 2.0.0 (CBCSolve standalone console application with little modification to make MPS file), to perform a MILP binary problem on win32 platform (windows XP). Program is compiled by MS Visual Studio 2005 version 8.0.50727. In many cases it works fine, but here we have one case (TZ.MPS file) where after some time (about half hour - depends on processor power) exception std::bad_alloc is raised. A new operator, from which exception is raised, is located in CoinPackedMatrix.cpp line 2459.

 int * newIndex = new int[maxSize_]; 
 where maxSize_=33736

Lack of memory is not the problem! During the execution of program, memory, seeing from Windows Task Manager, raised from 30MB to 70MB, but more then 1GB of RAM was free.

Identical or similar problem was detected by AJK (CbcModel?.cpp, line5369)

Questions: Is there something that we can modify in our system that will help to solve this problem on Win32 platform?

Attached files:

Example.zip - MPS file to perform CBC test

@svigerske svigerske added bug Something isn't working critical labels Mar 2, 2019
@svigerske
Copy link
Member Author

Attachment Example.zip by tomba created at 2008-02-06 14:23:16

TZ.mps

@svigerske
Copy link
Member Author

Comment by ladanyi created at 2008-02-08 02:43:23

Hello,

I wonder if you have access to purify... if so, can you try to run the code under purify to see if you get any error reports?

Also, did you just use the project file to compile? Can you try to compile with debugging enabled and see if you manage to get a memory error that way?

I'll try to replicate the error on my end, too.

--Laci

@svigerske
Copy link
Member Author

Comment by ladanyi created at 2008-02-08 02:43:23

Set assignee to ladanyi.

@svigerske
Copy link
Member Author

Comment by ladanyi created at 2008-02-08 02:43:23

Changing status from new to assigned.

@svigerske
Copy link
Member Author

Comment by @mlubin created at 2012-02-25 04:48:11

Old ticket but the issue is still around. I would guess that the problem is heap fragmentation. Calling ClpSimplex::setPersistenceFlag(1) (on a ClpSimplex instance) should fix the issue. This would need to be done at the level of Cbc in this case.

@svigerske
Copy link
Member Author

@jjhforrest Would you like to have a look at this one? @mlubin seems to suggest and easy fix. Maybe it can be applied even if not reproducing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants