mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Execute direct write to memory, if only one byte.
This commit is contained in:
parent
81c84025a2
commit
6d40502068
@ -4065,8 +4065,15 @@ Vector<Vector<int8_t>> View::GetMemoryPages() const
|
||||
const auto b0 = a0 & PageChunkMask;
|
||||
const auto b1 = a1 & PageChunkMask;
|
||||
const auto c0 = b0 >> ChunkBits;
|
||||
const auto c1 = ( b1 >> ChunkBits ) + 1;
|
||||
memset( page.data() + c0, val, c1 - c0 );
|
||||
const auto c1 = b1 >> ChunkBits;
|
||||
if( c0 == c1 )
|
||||
{
|
||||
*( page.data() + c0 ) = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( page.data() + c0, val, c1 - c0 + 1 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user