mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
5d5a4f804b
Also fix some Seek methods return types being unsigned, while returning negative errors. Added the CHECK_ASSERTION macro checks in a couple more places. Simplified CHECK_ASSERTION macro usage.
22 lines
543 B
C++
22 lines
543 B
C++
#pragma once
|
|
|
|
namespace memory_helper
|
|
{
|
|
/**
|
|
* Reserve size bytes of virtual memory and returns it.
|
|
* The memory should be commited before usage.
|
|
*/
|
|
void* reserve_memory(size_t size);
|
|
|
|
/**
|
|
* Commit page_size bytes of virtual memory starting at pointer.
|
|
* That is, bake reserved memory with physical memory.
|
|
* pointer should belong to a range of reserved memory.
|
|
*/
|
|
void commit_page_memory(void* pointer, size_t page_size);
|
|
|
|
/**
|
|
* Free memory alloced via reserve_memory.
|
|
*/
|
|
void free_reserved_memory(void* pointer, size_t size);
|
|
} |