question about memory shortage

Discussion in 'C Programming' started by Chang Byun, Oct 14, 2003.

  1. Chang Byun

    Chang Byun Guest

    I have question about memory allocation.

    I have a trouble when I run a C program.
    My C program has several big double pointer(** var) variables to
    structure data like 4 by 5000000.
    It is supposed to calculate those varibles with different parameters
    repeatedly with same size of variables.
    When it is running, the first several run is fine
    But it uses more and more memory, is used up all the main memory
    and swap memory and is stop.
    I am pretty sure that I free every variable for each run using free().

    My questions are,

    1. if the process needs more memory space even though every
    variables are released with free().
    2. How can I check if there is memory leak?
    3. Would it be better if big variables breaks down to smaller size
    variables.

    Any seggestions and helps would be very appreciated.

    Thanks,

    Chang Byun
     
    Chang Byun, Oct 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mahesh Prasad
    Replies:
    1
    Views:
    723
    Tom Wells
    Feb 22, 2004
  2. Cy Huckaba
    Replies:
    1
    Views:
    1,160
    Xie Xiao
    Jun 26, 2003
  3. eglato
    Replies:
    117
    Views:
    2,393
    Tris Orendorff
    Jun 24, 2005
  4. Chang Byun

    memory shortage

    Chang Byun, Oct 14, 2003, in forum: C Programming
    Replies:
    1
    Views:
    329
    Ravi Uday
    Oct 14, 2003
  5. Chang Byun

    question about memory shortage

    Chang Byun, Oct 14, 2003, in forum: C Programming
    Replies:
    4
    Views:
    434
    Chang Byun
    Oct 14, 2003
Loading...

Share This Page