summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntux_memfn_impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/ntux_memfn_impl.c')
-rw-r--r--src/internal/ntux_memfn_impl.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/internal/ntux_memfn_impl.c b/src/internal/ntux_memfn_impl.c
index cf930bb..7780fc6 100644
--- a/src/internal/ntux_memfn_impl.c
+++ b/src/internal/ntux_memfn_impl.c
@@ -4,8 +4,15 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
+#include <psxxfi/xfi_base.h>
+#include <psxxfi/xfi_acl.h>
+
+#include <ntapi/nt_memory.h>
+#include <ntapi/nt_file.h>
+#include <ntapi/nt_process.h>
+
#include <stddef.h>
-#include <ntapi/ntapi.h>
+
#include "ntux_memfn_impl.h"
#include "ntux_driver_impl.h"
@@ -23,7 +30,7 @@ void * ntux_calloc(size_t n, size_t size)
block.addr = 0;
block.size = size + sizeof(block);
- if (ntapi->zw_allocate_virtual_memory(
+ if (__xfi_allocate_virtual_memory(
NT_CURRENT_PROCESS_HANDLE,
&block.addr,
0,
@@ -64,7 +71,7 @@ void * ntux_balloc(
baddr = addr;
baddr -= offsetof(struct ntux_memory_block,buffer);
- ntapi->tt_aligned_block_memcpy(
+ __xfi_memcpy(
(uintptr_t *)block,
(uintptr_t *)baddr,
sizeof(*block));
@@ -86,7 +93,7 @@ void ntux_free(void * addr)
block.addr = addr;
block.size = 0;
- ntapi->zw_free_virtual_memory(
+ __xfi_free_virtual_memory(
NT_CURRENT_PROCESS_HANDLE,
&block.addr,
&block.size,