CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Programming in C

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 6, 2002, 12:37
Default Programming in C
  #1
Tony
Guest
 
Posts: n/a
Hi there,

I am very grateful if somebody can help me in the following questions:

I am doing some programming in MS C++ 6.0 for free-surface flows. I have some matrices whose dimensions are variable (say adding or subtracting a few columns). The memory is thus reallocated at every time steps. However, I found that the memory leaks and becomes ˇ°not enoughˇ± eventually for long-time runs. It seems to me that the reallocation may not free up the previously allocated memory.

My questions are (1) does realloc function really leak memory? (2) What should I do?

Appreciate your help.

Tony
  Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A book for a beginner wanting to learn programming frank Main CFD Forum 9 May 12, 2014 23:15
Programming a mesh m0t0r0ne Main CFD Forum 6 January 23, 2011 12:59
OpenFoam programming prapanj OpenFOAM 10 March 18, 2010 07:23
Programming in OpenFOAM vinu OpenFOAM 2 July 11, 2009 10:16
new CFD Programming Forum Thinker Main CFD Forum 14 November 19, 2002 16:03


All times are GMT -4. The time now is 09:11.