DevHelp FreePhys: Difference between revisions
Appearance
Created page with "This service releases physical memory allocated by the DevHlp_AllocPhys. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_FreePhys(PULONG PhysAddr) </PRE> ===Assembler=== <P..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:DevHelp_FreePhys}} | |||
This service releases physical memory allocated by the DevHlp_AllocPhys. | This service releases physical memory allocated by the DevHlp_AllocPhys. | ||
==Syntax== | ==Syntax== |
Latest revision as of 05:37, 11 May 2025
This service releases physical memory allocated by the DevHlp_AllocPhys.
Syntax
C
USHORT APIENTRY DevHelp_FreePhys(PULONG PhysAddr)
Assembler
MOV BX,address_low ; 32-bit physical address MOV AX,address_high ; MOV DL,DevHlp_FreePhys CALL [Device_Help]
Parameters
C
- PhysAddr (PULONG) - input
- Pointer to the 32 bit physical address of memory to be freed.
Assembler
MOV BX,address_low ; 32-bit physical address MOV AX,address_high ;
Return Code
C
- Success Indicator
- 0
- Possible errors
-
- Memory not freed
Assembler
'C' Clear if memory freed. 'C' Set if memory not freed.
Remarks
Any memory that the physical device driver allocated by way of the DevHlp_AllocPhys should be released prior to device driver termination. Memory that was not allocated with AllocPhys cannot be freed.
Example Code
C
#include "dhcalls.h" USHORT APIENTRY DevHelp_FreePhys(PULONG PhysAddr)