mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08: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 b0 = a0 & PageChunkMask;
|
||||||
const auto b1 = a1 & PageChunkMask;
|
const auto b1 = a1 & PageChunkMask;
|
||||||
const auto c0 = b0 >> ChunkBits;
|
const auto c0 = b0 >> ChunkBits;
|
||||||
const auto c1 = ( b1 >> ChunkBits ) + 1;
|
const auto c1 = b1 >> ChunkBits;
|
||||||
memset( page.data() + c0, val, c1 - c0 );
|
if( c0 == c1 )
|
||||||
|
{
|
||||||
|
*( page.data() + c0 ) = val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memset( page.data() + c0, val, c1 - c0 + 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user