Process memory usage

September 4th, 2006

Here are some tips about getting/controlling the memory usage of a given process…

Current memory usage
You can use GetProcessMemoryInfo() API function to get the current memory usage (in bytes), peak usage, number of bytes in pagefile currently used by a process, and so on. Add Windows to your uses clause […] Continue Reading…


wsCryptoPad text editor

September 2nd, 2006

This is more of a proof-of-concept that I created, but still pretty neat – it’s a text editor that stores the text in it’s own exe-file, compresses that text and optionally encrypts it. And it’s just 93 KB in size and doesn’t require installation!

Useful for… storing passwords, maybe 🙂 […] Continue Reading…


Generating text as a Markov chain

September 1st, 2006

Some words have a tendency to appear in certain contexts. For example, “jumps” is likely to be followed by “over”, but “cabagge” is probably not going to appear there. It is possible to analyze a text and determine how often words appear in specific contexts. These statistics can then be used for various purposes.

This method is useful for various tasks in natural language processing, but the fun part is you can use it to generate a random text that appears to be meaningful, and that’s what I’m going to do 🙂 […] Continue Reading…


wsKillHung application

August 29th, 2006

If you are a programmer you have probably encountered a situation when the program you are debugging suddenly enters an infinite loop or somesuch and starts consuming 100% CPU resources. Sure, you can press Ctrl-Alt-Delete and kill it from Task Manager, but it takes ages because everything is slooow […] Continue Reading…


How to get the CPU usage of a process

August 27th, 2006

In this short tarticle I will describe how to obtain the CPU usage of a single process (like the “CPU” column in Task Manager). I have also created a small unit that implements this functionality. […] Continue Reading…