|
[Sponsors] |
August 22, 2019, 04:31 |
memory allocation issue using Field<vector>
|
#1 |
New Member
/
Join Date: Jan 2019
Posts: 7
Rep Power: 7 |
Hi all!
The issue concerns following declaration: Field<vector> subCellPos(10000, vector::zero); It does not produce an error at compile time, rather shows up at runtime at the first instance of it. The funny thing is, that sometimes the code runs fine past this line (I cannot tell if it would work for more timesteps, since I have another issue later in the code). The error given most of the time is corrupted size vs. prev_size or sometimes malloc: invalid chunk size. I am certain that this line causes the crash, but unfortunately I am not experienced enough to fix this issue. I tried creating a smaller field with size 5 instead of 10000 and that works fine apparently, so my guess is it has something to do with stack size? Thanks in advance for any replies! |
|
August 22, 2019, 04:43 |
|
#2 |
New Member
/
Join Date: Jan 2019
Posts: 7
Rep Power: 7 |
Probably not a stack size issue, because I get the same error when declaring it on the heap using the new keyword.
|
|
August 23, 2019, 03:23 |
|
#3 |
New Member
/
Join Date: Jan 2019
Posts: 7
Rep Power: 7 |
The error was not caused by this line of code, even though debugging with Info messages made it seem as though it was.
|
|
May 11, 2020, 02:08 |
|
#4 |
New Member
Duc Anh
Join Date: Dec 2018
Posts: 22
Rep Power: 7 |
I am having a similar problem,
Can you give me some advice to fix it ? Thanks, |
|
May 11, 2020, 02:53 |
|
#5 |
New Member
/
Join Date: Jan 2019
Posts: 7
Rep Power: 7 |
Like I said, the error in my case was somewhere else... Usually something wrong with a pointer/reference or maybe you are trying to access an out of bounds list entry (or some other reason).
With enough patience you will find it! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Workbench 16.0 - Memory Allocation Factor | 196235 | CFX | 3 | August 11, 2016 02:05 |
memory allocation error | MAB | CFX | 16 | December 30, 2014 20:59 |
Run-time memory allocation error | akalopsis | CFX | 0 | November 17, 2014 17:17 |
Memory issue - Suse 10 - Opterons | Andy R | FLUENT | 1 | June 23, 2008 14:44 |
Memory allocation problem | Ammar Abdilghanie | FLUENT | 5 | February 19, 2007 18:15 |