Monday, August 24, 2009

ORACLE CEO's Salary $1



Bangalore: Software giant Oracle has informed in a regulatory filing, to cut the salary of its Chief Executive Larry Ellison to $1 in fiscal 2010 as compared to $1 million in the previous year. But according to Forbes, he will still remain as the fourth richest person in the world.



"The compensation committee recognizes that Ellison has a significant equity interest in Oracle, but believes he should still receive annual compensation because he plays an active and vital role in our operations, strategy and growth. Nevertheless, during fiscal 2010, Ellison agreed to decrease his annual salary to $1," said the company in a filing.

The compensation packages of the CEO include a base salary, an annual cash bonus and stock options.

In fiscal year 2009, the bonus and stock options comprised 97 percent of Ellison's overall compensation. According to the company, only 1.2 percent was his base salary and 1.8 percent was other benefits,.

His new $1 base salary puts him with the likes of Apple CEO Steve Jobs and Google co-founders Sergey Brin and Larry Page, who also take home the same package.

Larry Ellison, 64, had founded Oracle in 1977, and according to the SEC filing, he owns 1.18 billion shares of Oracle, which is 23.4 percent of the company's total stock.

Wednesday, August 12, 2009

Detecting a Memory Leak

To detect a memory leak
1. Create a CMemoryState object and call the Checkpoint member function to get the initial snapshot of memory.

2. After you perform the memory allocation and deallocation operations, create another CMemoryState object and call Checkpoint for that object to get a current snapshot of memory usage.

3. Create a third CMemoryState object, call the Difference member function, and supply the previous two CMemoryState objects as arguments. The return value for the Difference function will be nonzero if there is any difference between the two specified memory states, indicating that some memory blocks have not been deallocated.
The following example shows how to check for memory leaks:
// Declare the variables needed
#ifdef _DEBUG
CMemoryState oldMemState, newMemState, diffMemState;
oldMemState.Checkpoint();
#endif
// do your memory allocations and deallocations...
CString s = "This is a frame variable";
// the next object is a heap object
CPerson* p = new CPerson( "Smith", "Alan", "581-0215" );
#ifdef _DEBUG newMemState.Checkpoint();
if( diffMemState.Difference( oldMemState, newMemState ) )
{
TRACE( "Memory leaked!\n" );
}
#endif
Notice that the memory-checking statements are bracketed by #ifdef _DEBUG / #endif
blocks so that they are compiled only in Win32 Debug versions of your program.
Courtesy: MSDN