Regards
Ganesh
-----Original Message-----
From: GANESH KUMAR MURUGESAN
Sent: Tuesday, April 29, 2003 8:30 PM
To: 'vxwe...@csg.lbl.gov'
Subject: Load/Unload problem - reg
Hi all,
This is regarding loading and unloading the ".o"s in vxWorks. I have
observed that the vxWorks doesn't do a complete clean-up after I have
unloaded a ".o". I got the details about the memory statistics in my
test system by using "memShow".
Here is what I did:
1. Run memShow & collect the statistics.
2. Load a ".o"
3. Run the module by invoking the init of that module.
4. Run memShow & collect the memory statistics.
5. unload the ".o".
6. Run the memShow & collect the statistics.
The values obtained in step 1 & step 6 is expected to be same, but it
was not. There was a significant difference. I would like to know if
"unld" is safe to use or not.
Regards
Ganesh
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
Are you doing this from the host-based WindShell or from a
target-based shell? How much memory are you "losing"?
What specific commands do you issue to load and unload the module?
If you cd to a directory before loading the module or pass a
string to ld from the target shell, the target will need
to allocate memory for the string.
What type of code is in the module? C, C++, Ada, something else?
Unless you're using VxWorks AE, there is not automatic
resource reclamation. Simply unloading a module will not
free any run-time memory allocated by code within that module.
Regards,
Lori
> _______________________________________________
> VxWorks Users Group mailing list
> VxWe...@lbl.gov
> http://www-csg.lbl.gov/vxworks/
--
Lori Fraleigh Director of Engineering
Real-Time Innovations, Inc. http://www.rti.com
Phone: 408-734-4200 x121 Fax: 408-734-5009
Well, the man page for the unld function says that it frees the
text, bss, and data segments, _unless_ the module was loaded at a
specific address, in which no freeing of memory takes place. If you
have some C++ code that does some memory allocation "automagically"
when a module loads, then unld will not reverse the situation. It will
also not free semaphores, not undo any memory allocation specifically
done by the object code itself. I suspect that if the module were a
C module it would work, but I've never had a reason to use loading and
unloading, as in more traditional real-time systems, one never uses
dynamic memory allocation at all.
Speaking only for myself,
Joe Durusau