CurSlab->NextPtr = 0;
CurPtr = (char*)(CurSlab + 1);
End = ((char*)CurSlab) + CurSlab->Size;
+ BytesAllocated = 0;
}
/// Allocate - Allocate space at the specified alignment.
if (Ptr + Size <= End) {
CurPtr = Ptr + Size;
// Update the allocation point of this memory block in MemorySanitizer.
- // Without this, MemorySanitizer reports for values originating from it will
- // point to the allocation point of the entire slab.
+ // Without this, MemorySanitizer messages for values originated from here
+ // will point to the allocation of the entire slab.
__msan_allocated_memory(Ptr, Size);
return Ptr;
}