This commit is contained in:
Chuck Walbourn 2020-01-22 00:58:51 -08:00
Родитель 6362556e30
Коммит 186a8299b0
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -242,7 +242,9 @@ namespace
}
else
{
std::unique_ptr<uint32_t[]> xorder(new uint32_t[nVerts]);
std::unique_ptr<uint32_t[]> xorder(new (std::nothrow) uint32_t[nVerts]);
if (!xorder)
return E_OUTOFMEMORY;
// order in descending order
MakeXHeap(xorder.get(), positions, nVerts);

Просмотреть файл

@ -459,7 +459,10 @@ namespace
size_t misses = 0;
std::unique_ptr<uint32_t[]> fifo(new uint32_t[cacheSize]);
std::unique_ptr<uint32_t[]> fifo(new (std::nothrow) uint32_t[cacheSize]);
if (!fifo)
return;
size_t tail = 0;
memset(fifo.get(), 0xff, sizeof(uint32_t) * cacheSize);