A type oriented replacement for
This similar to P99_MALLOC with the extra feature that the allocated space is initialized with the default as if the variable or array had been declared static.
This macro receives one or two arguments. The first is a type expression that is evaluated for the size of the type and used to construct a default initializer for the type. The second is optional and controls how may objects of the type should be created.
double * a = P99_CALLOC(double, 10); // allocate and initialize an array of 10 double node * n = P99_CALLOC(node); // allocate and initialize one new node
Observe here that the