Showing archive results for 2012

Jan 23, 2012
Post comments count0
Post likes count1

Can OANOCACHE be used for non-debug purposes?

Raymond Chen
Raymond Chen

Friday asks whether OANOCACHE can be used for non-debug purposes, say to improve stability and/or speed. You can try, but it's not recommended. For one thing, it probably damages stability, because there are many applications out there which unwittingly rely on the BSTR cache to protect them from heap corruption bugs. The Windows team has for yea...

Code
Jan 18, 2012
Post comments count0
Post likes count1

Don't try to allocate memory until there is only x% free

Raymond Chen
Raymond Chen

I have an ongoing conflict with my in-laws. Their concept of the correct amount of food to have in the refrigerator is "more than will comfortably fit." Whenever they come to visit (which is quite often), they make sure to bring enough food so that my refrigerator bursts at the seams, with vegetables and eggs and other foodstuffs crammed into every...

Code
Jan 17, 2012
Post comments count0
Post likes count1

Microspeak: Walls and ladders

Raymond Chen
Raymond Chen

Reader laonianren wanted to know more about this game Walls and Ladders. "Walls and Ladders" is not a game. It's just a metaphor for a conflict in which one side wants to perform some action and the other side wants to prevent it. The defending side builds a wall, and the attacking side builds a taller ladder. In response, the defending side bui...

Non-ComputerMicrospeak
Jan 16, 2012
Post comments count0
Post likes count1

Cultural arbitrage: The food-related sucker bet

Raymond Chen
Raymond Chen

While I was at a group dinner at a Chinese restaurant, a whole fish was brought to our table. One of the other people at the table told a story of another time a whole fish was brought to the table. He attended the wedding rehearsal dinner of a family member. The bride is Chinese, but the groom is not. (Or maybe it was the other way around. Doesn'...

Non-Computer
Jan 13, 2012
Post comments count0
Post likes count1

Keys duplicated from photo: Delayed reaction

Raymond Chen
Raymond Chen

There was a report some time ago that researchers have developed a way to duplicate keys given only a photograph. When I read this story, I was reminded of an incident that occurred to a colleague of mine. He accidentally locked his keys in his car and called a locksmith. Frustratingly, the keys were sitting right there on the driver's seat. The ...

Non-Computer
Jan 13, 2012
Post comments count0
Post likes count1

How do I print non-error messages during compilation?

Raymond Chen
Raymond Chen

Commenter Worf remarked, "My one wish is that would be supported." I always find it interesting when people say "I wish that Microsoft would stop following standards," since the directive is nonstandard. The Microsoft C/C++ compiler implements the feature in a method compatible with the standard, namely via a directive. If you want ...

Code
Jan 12, 2012
Post comments count0
Post likes count1

Puzzling out the upsell-o-meter

Raymond Chen
Raymond Chen

As I noted before, many grocery stores in the United States have a printer next to the cash register which prints out coupons customized to your purchases. Here's a purchase and the accompanying coupon. What is the story behind this pairing? Purchased: Diapers for newborn baby. Coupon: Save 75 cents on ice cream. Bonus chatter: While waiting in ...

Non-Computer