From: Rui D. <di...@cn...> - 2005-11-07 11:21:09
|
Hi,All Recently,I run LTP test on RHLE4 (2.6.9-5.EL) using the fsx-linux case(testcase/kerne/io/ltp-aiodio/fsx-linux). This test case fsx-linux ,has draged out a defect with linux kernel. When I run the test case,the mem and swap was eat up gradully.At last,the system crashed because of out of memory and killed many other process.In other word ,this test case has failed. But,when I terminated the process of fsx before the system went down ,the swap and mem were nerver returned back to normal.And I was sure that there was no other process related with fsx-linux. It Looks like kernel never free the memory and swap spaces that fsx-linux had ever occupied when it was terminated. I diged into the code fsx-linux.c and found a interesing thing on fsx-linux.c line 1114 original_buf = (char *) malloc(maxfilelen); and on line 1117 good_buf = (char *) malloc(maxfilelen); It seems like to use malloc function to obtain heap memory dynamiclly. But I also found one more thing is there is no corresponding free function in this code. I was very curious about this. I have also did a experiment,I make a liittle change to the code ,add corresponding free function. Make and run.Oops! There is no same phenomenon occured.This case has passed! So can someone give a clear explaination about this ? What is the purpose of this case? Or give me clue to find out what is going on in the swap and mem on earth? Or something else? Thaks. ------------------------------------- Best Regards & Thanks Rickey 2005.11.7 |