Thanks for your suggestions. i shall be having a go at the malloc wrapper asap. However check this out: This is a 'top' for my situation. I'm running the app thorugh valgrind (appears as 'memcheck'). The server has now been up for 5 days and the app is still ok. But what you can make of this is that the total memory usage report (which is that about all mem is used and a small bit of swap too) has no correlation to the mem allocated to running processes. memcheck takes up 7.4% and no other process takes up more than 1% (cut short for brevity - take my word...)... How can this be? I do have the feeling that info from 'top' is not very reliable...
Code:
top - 12:12:18 up 5 days, 49 min, 2 users, load average: 2.56, 2.98, 2.86
Tasks: 92 total, 2 running, 89 sleeping, 0 stopped, 1 zombie
Cpu(s): 43.8% us, 1.5% sy, 0.0% ni, 54.1% id, 0.0% wa, 0.2% hi, 0.5% si
Mem: 2575056k total, 2556844k used, 18212k free, 174936k buffers
Swap: 2000084k total, 176k used, 1999908k free, 1860680k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5560 root 15 0 574m 185m 2884 S 91 7.4 5865:02 memcheck
10176 backuppc 20 0 105m 78m 1308 S 0 3.1 51:58.58 BackupPC_dump
4868 mysql 15 0 143m 22m 4952 S 0 0.9 0:28.49 mysqld
5402 gdm 16 0 67508 14m 6992 S 0 0.6 0:01.97 gdmgreeter
4633 root 16 0 53172 9764 3992 S 0 0.4 0:14.70 Xorg