Thanks for the answer.
I would like to clarify my question.
In ObjectStore they have not overloaded the operator new .They have overloaded the new operator (the new operator calls the opertaor new and subsequently the constructor).
ObjectStore basically reserves some space in memory and that area is known as Persistent storage. All data/objects allocated within that area gets stored to disk.
Is the persistent new (as ObjectStore calls it) an overloaded new operator or an overloaded operator new.
Another sub-question, Is the placement new an overloaded version of the new operator or an overloaded version of the operator new.
I am sorry for the messy question. It is a wee bit hard to describe the question in words.
ObjectStore (an OODB) uses an overloaded new operator to allocate memory.In fact it takes two parameters viz. the db handle (db in which to allocate the object) and apointer to the type of the object which will be allocated.
char* ptr =
new( db, os_ts<char *>::get))
Is this syntax similar to the syntax of placement new. Placement new basically assigns an object to some pre-allocated memory.
Normally we oveload the operator new instead of the new operator. In case of ObjectStore the new operator has been overloaded. I wonder how the overloded new operator works.