mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
vm_native.cpp: Use Windows 10 memory mapping API (the correct API)
This commit is contained in:
parent
7235647e67
commit
1738b38536
5 changed files with 233 additions and 20 deletions
|
@ -3,7 +3,7 @@
|
|||
#include "util/types.hpp"
|
||||
#include "util/atomic.hpp"
|
||||
|
||||
//! Simple sizeless array base for concurrent access. Cannot shrink, only growths automatically.
|
||||
//! Simple unshrinkable array base for concurrent access. Only growths automatically.
|
||||
//! There is no way to know the current size. The smaller index is, the faster it's accessed.
|
||||
//!
|
||||
//! T is the type of elements. Currently, default constructor of T shall be constexpr.
|
||||
|
@ -47,6 +47,18 @@ public:
|
|||
// Access recursively
|
||||
return (*m_next)[index - N];
|
||||
}
|
||||
|
||||
u64 size() const
|
||||
{
|
||||
u64 size_n = 0;
|
||||
|
||||
for (auto ptr = this; ptr; ptr = ptr->m_next)
|
||||
{
|
||||
size_n += N;
|
||||
}
|
||||
|
||||
return size_n;
|
||||
}
|
||||
};
|
||||
|
||||
//! Simple lock-free FIFO queue base. Based on lf_array<T, N> itself. Currently uses 32-bit counters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue