5 ms·
See my comment above. tcmalloc implements the C API as well, including aligned_alloc().
by amluto 4y ago
See my comment above. tcmalloc implements the C API as well, including aligned_alloc().
- olliej 4y agoIt doesn't matter what C APIs the allocator you're using provides, if it (or you) want to override global new and delete operators, you need to override all of them need to use that. The system implementation can't just assume that the overriding implementation happens to override and/or be compatible with C's implementation. Libcxx (the example here) uses posix_memalign for its aligned allocation - which tcmalloc could _also_ have overridden but doesn't. Again the problem is only some of the allocation routines being overridden.