AllocMem allocates a memory block and initializes each byte to zero.
Unit
Syntax
Parameters
Size
Size of memory block in bytes.
Return value
Pointer to allocated and zeroed memory of Size bytes long.
Exceptions
|
Remarks
AllocMem allocates a block of the given Size on the heap, and returns the address of this memory. Each byte in the allocated buffer is set to zero. To dispose of the buffer, use FreeMem. If there is not enough memory available to allocate the block, an EOutOfMemory exception is raised.
Note |
If the memory does not need to be zero-initialized, use GetMem instead. |
Note |
This is compatibility procedure, which appears in ELowLevel only in old languages, which do not have a build-in |
Examples
var
P: Pointer;
begin
P := AllowMem(1024);
FreeMem(P);
end;
See also
| Send feedback... |
Build date: 2014-12-03 Last edited: 2014-12-03 |
|
PRIVACY STATEMENT The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed. Permanent link to this article: http://www.eurekalog.com/help/eurekalog/topic_function_elowlevel_allocmem.php |
|