j-users@xerces.apache.org
[Top] [All Lists]

memory leak in parser symbol table ?

Subject: memory leak in parser symbol table ?
From: Vincent Le Maout
Date: Tue, 17 May 2005 17:41:42 +0200
Hi,

I'm currently using a SAX parser in a server application embedded in Tomcat. Requests are received in an XML form. The parser is not destroyed between successive calls. After roughly 200000 requests (not exactly the same count each time) I get a MemoryError (unable to allocate more I guess). By using a memory profiler (jmp) I noticed that 400000 strings were allocated and that most of them
reside in objects of type symbol table entry.
I took a look a source code : a table is used to avoid allocating strings too often and mutiple times (the so called symbol table). What does this table store ? tag and attributes name ? Does it store data ? I didn't see any method to remove data from this table so I guess everything is removed when it is destroyed but what if I never destroy my parser ? Is it possible that the table "leaks" ? Is it normal that
several hundred thousand strings be allocated in this table ?

Thanks in advance.

Vince


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>