Showing posts from April, 2007

Java JVM high memory usage problems

Though I have some three four years experience in C++ ,I did not have
that much oppurtunity to work in Java. Currenly I was doing some
analysis for a very simple CLI and was surprised to come with a memory
restriction. I found that if I use Java for developing the CLI
application I will be exhausting the memory of our Application Server
(AS). Just to mention the architecture ,users (telecom operators) use
a metaframe server client ( =something like remote desktop) to login
to the AS and then open a GUI to work on it. With Java I can service
only about 15 clients with the available memory . I just checked the
reason for this resource crunch and found that already many Java based
GUI's are served by the AS and each is taking some 25 MB or more. The
first thing I thought is that adding more RAM will solve this ( though
this is not an easy option) . Then I understood that a 32 bit system
can have just about 3 gb ram for applciations and our AS had already 4
GB with 1.5 GB VM also configured. The…

Windebug and Adplus for debugging process hang

1. Set the symbol, especillay windows symbols

2. Set the souce and image

3. Load the extension dll ( for !locks command ) if not already loaded

.load C:\Program Files\Debugging Tools for Windows\winxp\kdexts.dll

4. Use the !ntsdexts.locks ( or !locks) command to see a list of critical section

:004> !ntsdexts.locks

CritSec ntdll!LdrpLoaderLock+0 at 7C889D94
LockCount -6902
RecursionCount 1
OwningThread 2b3c
EntryCount 0
ContentionCount 28f3
*** Locked

CritSec +12f9b4 at 0012F9B4
LockCount 0
RecursionCount 0
OwningThread 0
*** Locked

CritSec +12f70c at 0012F70C
LockCount 0
RecursionCount 0
OwningThread 0
*** Locked

CritSec +128202c at 0128202C
LockCount -2
RecursionCount 1
OwningThread 3d9c
EntryCount 0
ContentionCount 0
*** Locked

A 'LockCount' other than 0 means that many threads are waitiing on this and it is the suspect

6. Do a …