Fix various issues in CAllocatorImpl