On Tue, Apr 22, 2008, Guido Serassio wrote: > >(Linux, Solaris, Windows? :) give the above a whirl and let me know what > >the > >output is? > > This code is not so clean for Windows: no rusage(), no bzero() and > some include files are missing ...
Oh, I know it won't compile for Windows. I really should get a Windows development environment together.. > But I'm getting strange results related to the machine memory usage/size: > > Windows XP Professional x64 SP2 with 2 GB RAM > C:\work\mem-size\Release>memsize.exe test1 131072 > allocating 12, then 4096 byte structures 131072 times.. > RSS: 31321 > C:\work\mem-size\Release>memsize.exe test2 131072 > allocating 4108 byte structure 131072 times.. > RSS: 30183 yeah, thats pretty invalid. :) I wonder if your method for returning RSS is valid. Put a getchar() call in before the exit(0); then monitor memory usage in taskman? Adrian -- - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support - - $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
