Problems with memory use, many large files
I am for the first time trying to write many, many large-ish files, on average about 10 Meg PDF's from a servlet environment. The memory my java webapp uses seems to stabilise out at around 800 Meg. If I produce 100 files, the free memory on my macbook pro drops to just over 100 Meg, (I have 4 Gig). Once my servlet has finished producing the PDF files, if I delete them, completely independently from stopping the servlet container... I instantly free up well over a Gig of memory. I am not sure what is causing this behaviour... as this memory is freed not when I stop the servlet container, but when I delete the files.
Can any tuning and performance experts out there give me a little advice ?
Thanks in advance for your help.