Francesco RUNDO napsal(a):
> Hi All,
>
> I'm running LTP (I'm using ltp-full-20090731....but asap I will upgrade
> to latest) on SH based platforms.
> Now, during a test-session. I've noted that the test "mtest01" reduced
> drastically the system memory and after its execution this memory wasn't
> de-allocated.
>
> I've analysed the mtest01.c code and I've noted that no "free()"
> istruction was associated to the related malloc:
Does this mean the kernel doesn't free processes' allocated memory on exit? Is
this intentional (and documented somewhere)?
> ......
> if((mem = (char*)malloc(chunksize)) == NULL) {
> ......
>
> I've simply added a "free(mem)" of the allocated memory and the issue
> was addressed successfully.
This isn't complete by far. You don't free all the allocations, and there are
code paths which don't pass your line before exit.
Regards
Jiri Palecek
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list