JCL Help:SHAllocMem

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Allocates memory using the Shell's memory allocator.


Pascal

 function SHAllocMem(out P: Pointer; Count: Integer): Boolean;


Parameters

Parameters Description
out P: Pointer Pointer variable which returns the address of the allocated memory block
Count: Integer Size, in bytes, of the block of memory to allocate.


Return Value

If the function succeeds it returns True and P contains the address of the allocated memory block. If the function fails it returns False and P will be set to nil.


Description

SHAllocMem allocates the specified amount of memory using the Shell's memory allocator. If the allocation succeeds then the memory block is initialized to all 0's, P is set to point to the allocated memory and the return value will be True. On failure, P retains its value and the return value will be False.


See Also

SHGetMem SHFreeMem


About

Unit

JclShell


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page