summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-10-29 10:49:25 +0000
committermidipix <writeonce@midipix.org>2020-10-29 10:52:02 +0000
commit40b6234aa042d2d4f185b1542b5f12154e0d850b (patch)
tree8a3d010a60d047f23d6d44ab34389b10c2e71223 /src
parent9e45fa3f87731b9235c593061601db7900160ef0 (diff)
downloadntapi-40b6234aa042d2d4f185b1542b5f12154e0d850b.tar.bz2
ntapi-40b6234aa042d2d4f185b1542b5f12154e0d850b.tar.xz
__ntapi_ipc_page_alloc(): internally set the size of memory to be allocated.
Diffstat (limited to 'src')
-rw-r--r--src/ipc/ntapi_ipc_connect.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ipc/ntapi_ipc_connect.c b/src/ipc/ntapi_ipc_connect.c
index 8b2e4a0..6d86f3b 100644
--- a/src/ipc/ntapi_ipc_connect.c
+++ b/src/ipc/ntapi_ipc_connect.c
@@ -582,25 +582,29 @@ int __ntapi_ipc_page_alloc(
size_t * alloc_size)
{
int32_t status;
+ size_t size;
ntapi_internals * __internals;
__internals = __ntapi_internals();
+ size = __NT_INTERNAL_PAGE_SIZE;
if (__internals->ipc_page == __NT_IPC_PAGES)
return NT_STATUS_QUOTA_EXCEEDED;
if ((status = __ntapi->zw_allocate_virtual_memory(
NT_CURRENT_PROCESS_HANDLE,
- addr,0,alloc_size,
+ addr,0,&size,
NT_MEM_COMMIT,
NT_PAGE_READWRITE)))
return status;
dalist_deposit_memory_block(
- dlist,*addr,*alloc_size);
+ dlist,*addr,size);
__internals->ipc_pages[__internals->ipc_page++] = *addr;
+ *alloc_size = size;
+
return 0;
}