Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

In Windows Embedded CE6 AllocPhysMem is only callable from kernel-space. The function OEM_AllocPhysMem is a workaround to use AllocPhysMem from user-space.
This function allocates physically contiguous memory.
See Platform-Builder-Help for details.

LPVOID OEM_AllocPhysMem(
  DWORD cbSize,
  DWORD fdwProtect,
  DWORD dwAlignmentMask,
  DWORD dwFlags,
  PULONG pPhysicalAddress
);

Parameters

cbSize [in] Number of bytes to allocate. The physical memory allocated is rounded up to the nearest page and is aligned on a 64-KB address.

fdwProtect
[in] Specifies the protection desired.

dwAlignmentMask
[in] Bit mask that describes the byte alignment needed. If it is set to zero, the default system alignment is used. If it is set to any other value, the kernel attempts to fulfill the memory request, based on the alignment request. The dwAlignmentMask parameter and a physical address determine whether the memory is aligned correctly for the request.

dwFlags
Reserved for future use. Must be set to zero.

pPhysicalAddress
[out] Pointer to a DWORD that stores the physical address of the memory allocation.

Return Values

A valid pointer indicates success. This pointer can't be used to access memory in CE6. Use OEM_MmMapIoSpace to map the physical-address to virtual-address-space.

Requirements

OS Versions: Windows Embedded CE 6.
Header: drvlib_app.h
Link Library: drvlib_app.lib
added: 20.06.2008

  • No labels