You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constsize_tzero_start= (copy_size >= sizeof(intptr_t) ? copy_size-sizeof(intptr_t) : 0); // also set last word in the previous allocation to zero to ensure any padding is zero-initialized
309
+
constsize_tusable=mi_usable_size(newp);
308
310
mi_assert_internal(usable >= newsize); // use usable for zero'ing, issue #763
309
-
if (zero&&usable>size) {
311
+
if (zero&&usable>zero_start) {
310
312
// also set last word in the previous allocation to zero to ensure any padding is zero-initialized
_mi_memcpy(newp, p, (newsize>size ? size : newsize)); // cannot be aligned due to abitrary offset... (todo: require offset to be a multiple of sizeof(void*)?)
315
+
_mi_memcpy(newp, p, copy_size); // cannot be aligned due to abitrary offset... (todo: require offset to be a multiple of sizeof(void*)?)
constsize_tzero_start=_mi_align_down( (copy_size >= sizeof(intptr_t) ? copy_size-sizeof(intptr_t) : 0), sizeof(intptr_t)); // also set last word in the previous allocation to zero to ensure any padding is zero-initialized
0 commit comments