Question about malloc and new
I have a question about the KLU library for LU factorization of sparse matrices.
The KLU library accepts a pointer to a memory allocator function, by default it is malloc().
Then it uses this pointer to allocate the memory required.
I want to extend the library and I now have object of classes. I want to use the operator new instead of malloc to allocate the memory. In the same time I want the new operator to call the constructors of the objects.
Is there a way to do it?
when you use new it automatically calls the constructor function.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL