summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dalist_memfn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dalist_memfn.c b/src/dalist_memfn.c
index e1fa9f0..0b3199d 100644
--- a/src/dalist_memfn.c
+++ b/src/dalist_memfn.c
@@ -160,7 +160,7 @@ static void * __cdecl dalist_alloc(struct dalist_ex * dlist)
/* pmemfn */
if (dlist->memfn_method == DALIST_MEMFN_CUSTOM)
- pmemfn = (dalist_memfn_custom *)dlist->memfn_ptr;
+ pmemfn = (dalist_memfn_custom *)(uintptr_t)dlist->memfn_ptr;
else
pmemfn = dalist_memfn_internal;
@@ -204,7 +204,7 @@ static int __cdecl dalist_memfn_internal(
size = (size_t)((struct dalist_node_ex *)0)->dblock
+ dlist->dblock_size;
- pfn_malloc = (memfn_malloc * )dlist->memfn_ptr;
+ pfn_malloc = (memfn_malloc *)(uintptr_t)dlist->memfn_ptr;
addr = pfn_malloc(size);
if (addr) {
@@ -218,7 +218,7 @@ static int __cdecl dalist_memfn_internal(
break;
case DALIST_MEMFN_MMAP:
- pfn_mmap = (memfn_mmap * )dlist->memfn_ptr;
+ pfn_mmap = (memfn_mmap * )(uintptr_t)dlist->memfn_ptr;
addr = pfn_mmap(
(void *)0,
@@ -240,7 +240,7 @@ static int __cdecl dalist_memfn_internal(
case DALIST_MEMFN_NT_ALLOCATE_VIRTUAL_MEMORY:
addr = (void *)0;
size = dlist->lblock_size;
- pfn_allocvm = (memfn_allocvm * )dlist->memfn_ptr;
+ pfn_allocvm = (memfn_allocvm *)(uintptr_t)dlist->memfn_ptr;
dlist->memfn_status = pfn_allocvm(
NT_CURRENT_PROCESS_HANDLE,