My apparent memory leak from the other day did in fact turn out to be leaking thread resources.
During the course of debugging a potential memory leak at work I noticed that Linux seems to allocate at least 8M of memory for each thread created. This very simple test program illustrates the memory allocations:
This is the first release of the Crate Game Engine after the rewrite.
Note that some of the details on volatile
are out of date now - 2016-03-15
Jon asks:
The follow code demonstrates a method for generating the Fibonacci Sequence at compile time. Since the sequence is generated at compile time runtime execution of retrieving a number is constant time.
I just updated the site with a new version of Drupal and am still working out some problems. Currently the image module doesn’t work correctly, so images will be missing. I’ll be tracking the updates to the modules and will get things back up as I can. In the meantime all the content is available.
This is going to be the first post of several, though I’m not sure how many just yet. The title of the post should be self explanatory, but I will elaborate. It is my strongly held belief that C++ is generally poorly understood and gets a bad rap because of this. It is also my belief that this is NOT the fault of C++, but rather the fault of old-school C++ developers who learned the language before the language was ratified in 1998.
Say you come up with a clever idea for initializing standard container types (blatantly stolen from the C++0x Initializer List concept). It might looks something like the implementation below: