#include <vector>
#include <iostream>

struct MemoryManager
{
    static void* allocate( unsigned size )
    {
        static char block[256];
        return block;
    }
};

class Foo
{
public:
    void* operator new[]( size_t size )
    {
        std::cout << "operator new[] : data size -- " << size << std::endl;
        return MemoryManager::allocate( size );
    }  
    
private:
    std::vector<long> m_dummy;  // Huh?
    unsigned m_num;
};

int main( int argc, char * argv[] )
{
    std::cout << "Foo size: " << sizeof( Foo ) << std::endl;
    new Foo [4];
    Foo::operator new[]( 4 * sizeof( Foo ) );
}
