1.8.08

Better Memory Management With Vista

Today, i just found out that Vista handles segfault much better than XP. I have reproduced the problem as you can see at the picture below.

 

nasty_small

 

While XP insanely kept ignoring this until it finally went to a boom boom (i can tell you it was horrible!), Vista treated it much better.

You see at the picture above, Vista just "localized" the problem.

I'm gonna find out more about this. But right now, all i can think of is how process in XP could easily pollute user space.

Incremental Link

I saw someone at dotnet forum asking for a help on building a very simple application.

He said that when he built the project, he encountered an error on something that has to be related with msvcr90d.dll.

And then the story continues to Incremental Link...

 

I think it's better for me to explain a bit about incremental link (/INCREMENTAL).

This option has nothing to do with the run-time library. It's just a smart mechanism to aid us as a programmer.

Before that it's also important to know the "flow" in order to produce the EXE. Basically there're 2 steps, compiling and linking.

When you compile a source file (C source file for example), you're going to generate an object file. That object file(s) will be linked together, and voila.. you have your EXE.

You see, compile -> link -> exe.

Imagine you have a huge project (ballistic missile control project) that contains hundreds (or maybe thousand) of source file. When you change 1 source file you have to build the whole project. Compiling and then linking those hundreds object files. What this means?

Total waste of time.

 

And this is how incremental link works. You don't have to build the whole project, and waste your precious time.

When you activate this option, you'll see an ilk file. I would say this is a database which contains information about your project. For example timestamps of every object file you generated before. So when you change one file, and you generate object file, that (only) changed object file will be "patched" to a previously exe.

 

Let's experiment this, and compare the time needed to build the project. See the difference?

But, yes there's a but :)

1. Your application will be fatter (in my case 1.78 MB vs 1.43 MB)

2. May contain jump thunks*

 

Also, there's an important note from the MSDN:

To ensure that your final release build does not contain padding or thunks, link your program nonincrementally.

 

If you want to know more about code and data padding or thunks, check this website:

http://msdn.microsoft.com/en-us/library/4khtbfyf(VS.80).aspx

or this:

http://docs.sun.com/source/806-3567/ild.html

 

Back to the problem with our very simple application problem. I would say the problem is in the run-time library. He needs to make sure which library he wants to link. When he said there's an error with msvcr90d.dll. He must have linked the application with msvcrtd.lib. And this is the multithreaded and dynamic link (debug) version.

Make sure this with project's settings.

1.  C/C++ -> Code Generation -> Runtime Library

2. Linker -> Input

28.7.08

(kinda) Addicted to Andrew

I don't know why, but i guess i'm kind of addicted to this shoes.
In fact yesterday was the 3rd buy.
My first impression with this shoes (as i wrote down on their customer satisfaction survey form) is comfort. I gotta admit their shoes is (until now) the most comfortable shoes i have ever owned.
Not to mention its durability. (this shoes has helped me a lot during Jakarta's yearly flood)

They used to give goodies for every purchase (i have a mug and an umbrella), but sadly they just stop this giveaway. Yesterday they gave me a 100k voucher. (but, yes it's a but) You can only use that voucher to buy kids shoes, and not only that.. the voucher itself, will be expired this august. Sad.