mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-31 19:47:06 +01:00
Core: Init memory on multiple threads.
Also init volatile at the same time for consistency.
This commit is contained in:
1 parent
6ee944a0a6
commit
4f96169357
6 files changed
+18
-12
No files matched your search
@@ -133,3 +133,10 @@ void ThreadPool::ParallelMemcpy(void *dest, const void *src, int size) {
|
||||
memmove((uint8_t *)dest + l, (const uint8_t *)src + l, h - l);
|
||||
}, 0, size, MIN_SIZE);
|
||||
}
|
||||
|
||||
void ThreadPool::ParallelMemset(void *dest, uint8_t val, int size) {
|
||||
static const int MIN_SIZE = 128 * 1024;
|
||||
ParallelLoop([&](int l, int h) {
|
||||
memset((uint8_t *)dest + l, val, h - l);
|
||||
}, 0, size, MIN_SIZE);
|
||||
}
|
||||
Reference in new issue
Block a user