Hi Guys, I have a high memory requirement in my code and this statement is repeated a lot of times:
Node** x;
x = new Node*[11];
It fails at this allocation. I figured out this line by throwing output to the console!
I am building my code on Visual Studio. It works fine in Debug mode (both in VS2005 and VS2008) However it throws the error in VS2005 Release mode. A direct exe generated from cl Program.cpp works if cl is from VS2010 but fails when it's from VS2005. Any clues?
PS: Linux gives me a Bus Error(core dumped) for the same Thanks
UPDATE: And I guess, it can be due to 'unaligned' thing as I understand. I just made 11 to 12 (or any even number) and It works!!! I don't know why. It doesn't work with odd numbers!
Update 2 : http://www.devx.com/tips/Tip/13265 ?