Controlling Useage of RAM/cached memory in writting TTree to TFile

HI,
I have a standalone code that converts some simulation output files from binary to .root. So I am reading events from bnary format and saving them to TTree. Now I have used tree-> SetMaxVirtualSize(1 GB), which seems to work fine. I am calling gSystem->GetProcInfo() from within the event loop.
It gives me res memory and virtual memory usage as follows (converted to MB)

res memory = 240.809 ; virtual memory = 459.043
res memory = 241.289 ; virtual memory = 459.5
res memory = 241.379 ; virtual memory = 459.5
res memory = 279.23 ; virtual memory = 489.266
res memory = 279.238 ; virtual memory = 489.438
res memory = 279.672 ; virtual memory = 489.941
res memory = 279.832 ; virtual memory = 489.941
res memory = 279.832 ; virtual memory = 489.941
res memory = 301.219 ; virtual memory = 505.332
res memory = 302.105 ; virtual memory = 506.254
res memory = 302.902 ; virtual memory = 507.055
res memory = 302.934 ; virtual memory = 507.055
res memory = 302.934 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.18 ; virtual memory = 507.301
res memory = 303.188 ; virtual memory = 507.301

On the other hand, while process is running if I run ‘free -m’ in other terminal, it shows very high amount of used RAM and cached memory as follows:

[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7741        142          0        144       6672
-/+ buffers/cache:        924       6959
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7743        141          0        144       6672
-/+ buffers/cache:        925       6958
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7752        132          0        144       6682
-/+ buffers/cache:        925       6959
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7753        131          0        144       6682
-/+ buffers/cache:        925       6958
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7754        130          0        144       6682
-/+ buffers/cache:        927       6957
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7754        130          0        144       6682
-/+ buffers/cache:        927       6957
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7754        130          0        144       6682
-/+ buffers/cache:        926       6957
Swap:         7887          0       7887
[chinmay@localhost build]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7884       7754        130          0        144       6682
-/+ buffers/cache:        926       6957
Swap:         7887          0       7887

Whats happening here ? Does it mean this code will not run on smaller RAM PCs ?

I am using ROOT v 5.34/14 on fedora 18