Home | History | Annotate | Download | only in wtf

Lines Matching defs:totalBytes

260     size_t totalBytes = n_elements * element_size;
261 if (n_elements > 1 && element_size && (totalBytes / element_size) != n_elements || (std::numeric_limits<size_t>::max() - sizeof(AllocAlignmentInteger) <= totalBytes))
264 totalBytes += sizeof(AllocAlignmentInteger);
265 void* result = malloc(totalBytes);
269 memset(result, 0, totalBytes);
3751 size_t totalBytes = n * elem_size;
3754 if (n > 1 && elem_size && (totalBytes / elem_size) != n)
3758 if (std::numeric_limits<size_t>::max() - sizeof(AllocAlignmentInteger) <= totalBytes) // If overflow would occur...
3761 totalBytes += sizeof(AllocAlignmentInteger);
3762 void* result = do_malloc(totalBytes);
3766 memset(result, 0, totalBytes);
3770 void* result = do_malloc(totalBytes);
3772 memset(result, 0, totalBytes);
3777 MallocHook::InvokeNewHook(result, totalBytes);