Warning: you were redirected to the latest documentation corresponding to your major release ( 2023.1.4.8496 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Go to the documentation of this file.
33 #define AK_VM_PAGE_SIZE (64*1024)
34 #define AK_VM_HUGE_PAGE_SIZE (2*1024*1024)
35 #define AK_VM_DEVICE_PAGE_SIZE (64*1024)
41 const int kMemoryFlags = SCE_KERNEL_PROT_CPU_RW | SCE_KERNEL_PROT_GPU_RW | SCE_KERNEL_PROT_AMPR_ALL;
42 const int kDeviceMemoryFlags = SCE_KERNEL_PROT_CPU_RW | SCE_KERNEL_PROT_GPU_RW | SCE_KERNEL_PROT_AMPR_ALL | SCE_KERNEL_PROT_ACP_RW;
47 off_t directMemStart = 0;
53 err = sceKernelAllocateMainDirectMemory(size, alignment, SCE_KERNEL_MTYPE_C_SHARED, &directMemStart);
61 *extra = (size_t)directMemStart;
71 off_t directMemStart = (off_t)extra;
72 int32_t err = sceKernelReleaseDirectMemory(directMemStart, release);
80 off_t directMemStart = 0;
86 err = sceKernelAllocateMainDirectMemory(size, alignment, SCE_KERNEL_MTYPE_C_SHARED, &directMemStart);
93 *extra = (size_t)directMemStart;
103 off_t directMemStart = (off_t)extra;
104 int32_t err = sceKernelReleaseDirectMemory(directMemStart, release);
111 void* pStart, * pEnd;
119 int err = sceKernelQueryMemoryProtection(address, &pStart, &pEnd, &prot);
124 if ((prot & expectedProt) != expectedProt)
Platform-dependent helpers.
AkForceInline bool CheckMemoryProtection(void *address, size_t size, int expectedProt)
uintptr_t AkUIntPtr
Integer (unsigned) type for pointers.
AkForceInline void * AllocVM(size_t size, size_t *extra)
#define AKASSERT(Condition)
const int kDeviceMemoryFlags
AkForceInline void * AllocDevice(size_t size, size_t *extra)
AkForceInline void FreeDevice(void *address, size_t size, size_t extra, size_t release)
AkForceInline void FreeVM(void *address, size_t size, size_t extra, size_t release)
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise