Hi,
I'm trying to implement my own allocator using malloc and free. One thing what interests me is that in declaration of deallocate in addition to pointer we have also parameter size which suppose to be size of elements allocated with allocate but having implemented my deallocate as this:
template<typename T>
void Allocator<T>::deallocate(pointer p, size_type n)
{
free(p);
}
I have no idea for what I should use this (size_type) parameter.
Looking forward to your reply.
Thank you.