03-14-2014
Do you suspect that the memory leak is in a userland application or in kernel space?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am running HP-UX B.11.11.
I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used.
But when I try to start the DB with the increased buffer parameter I get told.
"Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies
2. Programming
Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10.
My code to marshal... (6 Replies)
Discussion started by: nj302
6 Replies
3. AIX
Hi,
I am working on a project which uses 64-bit capability of AIX. This is
very recently ported to 64-bit and leaking like anything now. I purified
the program on 64-bit and ran it, purify is not showing any leak.
Even memory usage has become very normal in purified binary compared to my... (2 Replies)
Discussion started by: jeet_xp
2 Replies
4. UNIX for Advanced & Expert Users
I'm trying to use application-managed stacks, i.e. allocating the stack myself and passing it to the pthread creation attributes through pthread_setstack -function. My problem is that the memory allocated for the stack seems to leak after the thread terminates.
Only information I have been able... (2 Replies)
Discussion started by: lassel
2 Replies
5. Solaris
Hi,
Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:-
1. Total Physical Memory in the system(total RAM).
2. Available Physical Memory(i.e. RAM Usage)
3. Total (Logical) Memory in the system
4. Available (Logical) Memory.
I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies
6. Programming
Hi,
I'm trying to learn how to manage memory when I have to deal with lots of data.
Basically I'm indexing a huge file (5GB, but it can be bigger), by creating tables that
holds offset <-> startOfSomeData information. Currently I'm mapping the whole file at
once (yep!) but of course the... (1 Reply)
Discussion started by: emitrax
1 Replies
7. Solaris
Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies
8. Red Hat
I use linux and unix and run aplication.
How I can use command top , vmstat ,free ...etc
existing command to find out there is memory leaking ???
Please give me example .
It is not allow to use compiler to compile the program /tool. (2 Replies)
Discussion started by: chuikingman
2 Replies
9. IP Networking
Network map:
WAN external interface 192.0.0.0 network
|
WAN internal interface 192.0.3.0 network
|
192.0.3.0 LAN
|
wireless router 192.0.3.1
|
DSL modem 192.0.3.2
The problem I am having is that some traffic from the 192.0.3.0 LAN seems to be "leaking" onto the 192.0.0.0 WAN. I... (0 Replies)
Discussion started by: herot
0 Replies
10. Solaris
Hi Experts,
Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing.
Why memory utilization on solaris always looks high?
I have statement about memory on solaris, is this true:
Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies
LEARN ABOUT OPENDARWIN
tcl_mem_debug
TCL_MEM_DEBUG(3) Tcl Library Procedures TCL_MEM_DEBUG(3)
__________________________________________________________________________________________________________________________________________________
NAME
TCL_MEM_DEBUG - Compile-time flag to enable Tcl memory debugging.
_________________________________________________________________
DESCRIPTION
When Tcl is compiled with TCL_MEM_DEBUG defined, a powerful set of memory debugging aids are included in the compiled binary. This
includes C and Tcl functions which can aid with debugging memory leaks, memory allocation overruns, and other memory related errors.
ENABLING MEMORY DEBUGGING
To enable memory debugging, Tcl should be recompiled from scratch with TCL_MEM_DEBUG defined. This will also compile in a non-stub version
of Tcl_InitMemory to add the memory command to Tcl.
TCL_MEM_DEBUG must be either left defined for all modules or undefined for all modules that are going to be linked together. If they are
not, link errors will occur, with either TclDbCkfree and Tcl_DbCkalloc or Tcl_Ckalloc and Tcl_Ckfree being undefined.
Once memory debugging support has been compiled into Tcl, the C functions Tcl_ValidateAllMemory, and Tcl_DumpActiveMemory, and the Tcl mem-
ory command can be used to validate and examine memory usage.
GUARD ZONES
When memory debugging is enabled, whenever a call to ckalloc is made, slightly more memory than requested is allocated so the memory debug-
ging code can keep track of the allocated memory, and eight-byte ``guard zones'' are placed in front of and behind the space that will be
returned to the caller. (The sizes of the guard zones are defined by the C #define LOW_GUARD_SIZE and #define HIGH_GUARD_SIZE in the file
generic/tclCkalloc.c -- it can be extended if you suspect large overwrite problems, at some cost in performance.) A known pattern is writ-
ten into the guard zones and, on a call to ckfree, the guard zones of the space being freed are checked to see if either zone has been mod-
ified in any way. If one has been, the guard bytes and their new contents are identified, and a ``low guard failed'' or ``high guard
failed'' message is issued. The ``guard failed'' message includes the address of the memory packet and the file name and line number of
the code that called ckfree. This allows you to detect the common sorts of one-off problems, where not enough space was allocated to con-
tain the data written, for example.
DEBUGGING DIFFICULT MEMORY CORRUPTION PROBLEMS
Normally, Tcl compiled with memory debugging enabled will make it easy to isolate a corruption problem. Turning on memory validation with
the memory command can help isolate difficult problems. If you suspect (or know) that corruption is occurring before the Tcl interpreter
comes up far enough for you to issue commands, you can set MEM_VALIDATE define, recompile tclCkalloc.c and rebuild Tcl. This will enable
memory validation from the first call to ckalloc, again, at a large performance impact.
If you are desperate and validating memory on every call to ckalloc and ckfree isn't enough, you can explicitly call Tcl_ValidateAllMemory
directly at any point. It takes a char * and an int which are normally the filename and line number of the caller, but they can actually
be anything you want. Remember to remove the calls after you find the problem.
SEE ALSO
ckalloc, memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
KEYWORDS
memory, debug
Tcl 8.1 TCL_MEM_DEBUG(3)