HScript Memory Command

Checking Memory Usage In Houdini

This may not be the most exciting or life changing Houdini tip you will come across. I’ve been developing some scripts that need to check the Houdini memory footprint. I figured this bit of information may come in handy for someone out there. There are specialized applications and utilities at the OS level that provide this information. However, I needed something I could access programatically. As luck would have it, checking memory usage in Houdini is built right in.

Memory Usage

I mentioned while developing some tools, I needed to check the memory usage in Houdini for some conditional statements. My initial thoughts were to accomplish this via Python or some Unix command line tools. Profiling memory is not difficult but sometimes can be tricky. I decided to check the HScript docs and sure enough, the command was available.

The HScript command to check memory usage in Houdini is called memory. This is the signature for the command:

memory [-b]

All you have to do is open a Textport window and type in the command memory. It really does not get any easier than this. Once you hit enter, Houdini will spit out the current memory consumption along with the chunk of memory it is allocating on the heap. As far as accuracy, I would think it’s a good indicator. If you pass in the -b option to memory, it will print out the memory usage in bytes.

Memory command
Memory command


I am a motion designer & developer based out of South Florida. When not designing or animating pixels, I wrangle some code. If all else fails, I watch Twilight Zone, I Love Lucy, or Three's Company reruns.