Articles
-
Performance Tuning - Stress Testing
by oxnz
Introduction
Stress (Load) testing.
-
System Administration - Security
by oxnz
Introduction
This article describes security related stuff about server and workstation.
-
MySQL Primer - Benchmarking and Profiling
by oxnz
Introduction
This article described some basic usage of mysql server and introduce intermediate MySQL internals.
-
MySQL Primer - Infrastructure
by oxnz
Introduction
This article describes the infrastructure of MySQL.
-
Design Patterns
by oxnz
Table of Contents
-
argv[argc] == null
by oxnz
Is
argv[argc] == null
always true? -
Resource reclaim when exit() called
by oxnz
What REALLY happens when you don’t free after malloc?
-
Inside The Search Engine
by oxnz
Table of Contents
-
C++ 中的 RAII 机制
by oxnz
作者:gnuhpc
出处:http://www.cnblogs.com/gnuhpc/Table of Contents
1.概念
Resource Acquisition Is Initialization 机制是 [Bjarne Stroustrup] 首先提出的。要解决的是这样一个问题:
在C++中,如果在这个程序段结束时需要完成一些资源释放工作,那么正常情况下自然是没有什么问题,但是当一个异常抛出时,释放资源的语句就不会被执行。 于是 [Bjarne Stroustrup] 就想到确保能运行资源释放代码的地方就是在这个程序段(栈帧)中放置的对象的析构函数了,因为 stack winding 会保证它们的析构函数都会被执行。
将初始化和资源释放都移动到一个包装类中的好处:
- 保证了资源的正常释放
- 省去了在异常处理中冗长而重复甚至有些还不一定执行到的清理逻辑,进而确保了代码的异常安全。
- 简化代码体积。
-
Task Management
by oxnz
Introduction
Cron & at