EurekaLog
Menu

EurekaLog 7 Manual

_NameThreadForDebugging - EurekaLog 7 Documentation

AllocMem allocates a memory block and initializes each byte to zero.

Retains access to the exception object.

Releases an exception object acquired by AcquireExceptionObject.

Unit

ELowLevel

Syntax

procedure _NameThreadForDebugging(

const ATID: Cardinal;

const AThreadName: String

);

Parameters

Size

Size of memory block in bytes.

Return value

Pointer to allocated and zeroed memory of Size bytes long.

Exception object or nil if there is no exception object.

You must free this object by calling ReleaseExceptionObject.

Exceptions

System.SysUtils.EOutOfMemory

Not enough memory to complete request.

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 AllocMem.

AcquireExceptionObject returns a pointer to the current exception object and prevents the exception object from being deallocated when the current exception handler exits.

Note

AcquireExceptionObject increments the exception object's reference count. Make sure that the reference count is decremented when the exception object is no longer needed. This happens automatically if you use the exception object to raise the exception again. In all other cases, every call to AcquireExceptionObject must have a matching call to ReleaseExceptionObject. AcquireExceptionObject/ReleaseExceptionObject sequences can be nested.

Note

This is compatibility procedure, which appears in ELowLevel only in old languages, which do not have a build-in AcquireExceptionObject.

ReleaseExceptionObject releases an exception object previously acquired by AcquireExceptionObject.

Note

This is compatibility procedure, which appears in ELowLevel only in old languages, which do not have a build-in ReleaseExceptionObject.

Examples

var
P: Pointer;
begin
P := AllowMem(1024);
FreeMem(P);
end;

See also

• ReleaseExceptionObject
• AcquireExceptionObject


Send feedback... Build date: 2015-09-24
Last edited: 2015-09-24
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__namethreadfordebugging.php