Charles wrote: > On Wednesday 21 May 2008 19:21:08 rohit h wrote: > >> Hello all, >> I instrumented yaffs2 code (picked from yaffs2 cvs on 5th Oct 2007) > to find >> out memory usage. >> In yaffs_MknodObject( ) and yaffs_CheckObjectDetailsLoaded( ), if we >> get symbolic link >> we call yaffs_CloneString( ) which kmallocs some memory. >> I have a doubt as to where this memory is being freed. >> Can somebody help ? >> Thanks >> Rohit/ > > The cloned string is just a copy of the passed in string. It is > attached as > the alias string. > > This is freed in static int yaffs_DeleteSymLink(), called by > DestroyObject() > and yaffs_UnlinkWorker(). > > -- Charles Hello everyone, Please forgive my delayed reply. Consider the following scenario: 1. Mount YAFFS2. 2. Create symbolic link. yaffs_CloneString( ) gets called and memory is allocated. 3. Unmount YAFFS2. yaffs_DestroyObject( ) is not called. yaffs)_UnlinkWorker( ) is also not called. I am not sure, maybe we should free the memory in yaffs_DeinitialiseObjects( ). Thanks, Rohit