Is there any tool for knowing how much memory is used by Fantom program? If it's, it could be used too for non-fantom programs?
Thanks, Xan.
SlimerDudeSun 10 Jun 2012
Assuming you want to look at JVM memory usage, there's a host of JVM profiling tools out there... but for basic stuff you can just use JConsole that's bundled with the JDK.
Start your Fantom app
type JConsole on the command line
select your Fantom process from the list
brianSun 10 Jun 2012
You can get current heap usage from:
Env.cur.diagnostics["mem.heap"]
In general most important two things for managing JVM memory:
give yourself enough heap size on startup
make sure have nice working chunk of that heap (for example steady state heap usage is only 60% of max or whatnot)
XanSun 10 Jun 2012
Thanks, brian. @SlimerDude: my app is too short for waiting jconsole... thanks
Is there any not JVM-specific tool for that? That we can use for C or python scripts and compare JVM against those?
$ fan mget-memoria.fan
/home/xan/proves/yot-ng/propi/codi/aranya-fantom/mget-memoria.fan(61,57): Unexpected end of Str literal, missing }
ERROR: cannot compile script
What happens? Wrong syntax?
Thanks, Xan.
brianSun 10 Jun 2012
Don't try to use a string literal inside a string literal (in fact we are going to make that an error)
Xan Sun 10 Jun 2012
Hi,
Is there any tool for knowing how much memory is used by Fantom program? If it's, it could be used too for non-fantom programs?
Thanks, Xan.
SlimerDude Sun 10 Jun 2012
Assuming you want to look at JVM memory usage, there's a host of JVM profiling tools out there... but for basic stuff you can just use JConsole that's bundled with the JDK.
JConsole
on the command linebrian Sun 10 Jun 2012
You can get current heap usage from:
In general most important two things for managing JVM memory:
Xan Sun 10 Jun 2012
Thanks, brian. @SlimerDude: my app is too short for waiting jconsole... thanks
Is there any not JVM-specific tool for that? That we can use for C or python scripts and compare JVM against those?
Thanks, Xan.
Xan Sun 10 Jun 2012
I get error with this:
What happens? Wrong syntax?
Thanks, Xan.
brian Sun 10 Jun 2012
Don't try to use a string literal inside a string literal (in fact we are going to make that an error)
Xan Mon 11 Jun 2012
Mmmm... thanks, but with "$var" don't you punt the value of the variable var? Why don't work this?
Xan.