Adobe.com
Contents Suites Classes Class Index Member Index

AIBlockSuite Struct Reference
[API Suite List]

This suite provides a cross-platform way to manage memory. More...

#include <AIBlock.h>

List of all members.

Public Attributes

AIAPI AIErr(* AllocateBlock )(size_t size, void **block)
 Allocates new block of memory.
AIAPI AIErr(* DisposeBlock )(void *block)
 Releases a block of memory previously allocated with AllocateBlock().
AIAPI AIErr(* ReallocateBlock )(void *block, size_t newSize, void **newBlock)
 Changes the size of a previously allocated memory block.
AIAPI AIErr(* SizeOfMemoryBlock )(void *block, size_t *size)
 Gets number of bytes in a memory block.

Detailed Description

This suite provides a cross-platform way to manage memory.

Use it to request, release, and resize blocks of memory. The functions are analogous to the standard C library memory allocation routines or the Mac OS pointer routines.

In some situations, Illustrator expects memory to be allocated with this suite.


Member Data Documentation

AIAPI AIErr(* AIBlockSuite::AllocateBlock)(size_t size, void **block)

Allocates new block of memory.

This call is similar to the standard C library malloc routine and the Macintosh Toolbox NewPtr.

Parameters:
size The number of bytes to allocate.
block [out] A buffer in which to return the pointer to the newly allocated block.
Returns:
The error kOutOfMemoryErr if the function fails due to lack of memory.
AIAPI AIErr(* AIBlockSuite::DisposeBlock)(void *block)

Releases a block of memory previously allocated with AllocateBlock().

This call is similar to the standard C library free function and the Macintosh Toolbox DisposPtr.

Parameters:
block A pointer to the allocated block.
AIAPI AIErr(* AIBlockSuite::ReallocateBlock)(void *block, size_t newSize, void **newBlock)

Changes the size of a previously allocated memory block.

This function is similar to the standard C library realloc function and the Macintosh Toolbox SetPtrSize. The function tries to increase the size of the block without changing its location. If there is not room on the heap, the block is moved and the new location returned.

Parameters:
block A pointer to the previously allocated block.
size The number of bytes to allocate.
NewBlock [out] A buffer in which to return the pointer to the newly allocated block.
Returns:
The error kOutOfMemoryErr if the function fails due to lack of memory.
AIAPI AIErr(* AIBlockSuite::SizeOfMemoryBlock)(void *block, size_t *size)

Gets number of bytes in a memory block.

Parameters:
block A pointer to the previously allocated block.
size [out] A buffer in which to return the number of bytes.

The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks