allocating memory at a specific address if avalible?
is this possable?
basicly im looking for good dma.
is this possable?
basicly im looking for good dma.
VirtualAllocEx
VirtualAllocEx isnt in my win.hlp, did you mean VirtualAlloc??
It wouldn't think that VirtualAlloc would be present in Win32.hlp as that file is way outdated and its not a strictly Win32 function as its only supported on NT systems. But here is the link to the online SDK:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualallocex.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualallocex.asp
huh: do you mean VirtualAllocEx?
VirtualAllocEx(not available on 9x) allows remote memory allocation, while with VirtualAlloc you can only commit and/or reserve memory in your own address space.
VirtualAllocEx(not available on 9x) allows remote memory allocation, while with VirtualAlloc you can only commit and/or reserve memory in your own address space.
From MSDN:
****************************************
LPVOID VirtualAlloc( LPVOID lpAddress, // address of region to reserve or commit
DWORD dwSize, // size of region
DWORD flAllocationType, // type of allocation
DWORD flProtect // type of access protection
);
Parameters:
lpAddress
Specifies the desired starting address of the region to allocate. If the memory is being reserved, the specified address is rounded down to the next 64-kilobyte boundary. If the memory is already reserved and is being committed, the address is rounded down to the next page boundary. To determine the size of a page on the host computer, use the GetSystemInfo function. If this parameter is NULL, the system determines where to allocate the region.
*****************************************
So VirtualAlloc should suffice.
****************************************
LPVOID VirtualAlloc( LPVOID lpAddress, // address of region to reserve or commit
DWORD dwSize, // size of region
DWORD flAllocationType, // type of allocation
DWORD flProtect // type of access protection
);
Parameters:
lpAddress
Specifies the desired starting address of the region to allocate. If the memory is being reserved, the specified address is rounded down to the next 64-kilobyte boundary. If the memory is already reserved and is being committed, the address is rounded down to the next page boundary. To determine the size of a page on the host computer, use the GetSystemInfo function. If this parameter is NULL, the system determines where to allocate the region.
*****************************************
So VirtualAlloc should suffice.
Whoops, I just remembered that VirtualAlloc(Ex) you could specify an address but when I looked through my SDK I missed the lpAddress param somehow in VirtualAlloc :rolleyes: I think I must of been a bit tired
:stupid:
:stupid: