| Function allocate Allocates memory from heap. allocate(object, data, count [, usage_tag]) Parameters
object | Allocator object. Types: Allocator Remarks: object is conceptually the "owner" of the allocated memory. Objects of all types can be used as allocators. If no special behavior is implemented, default functions allocation/deallocation are applied that uses standard new and delete operators.
count | Number of items that could be stored in the allocated memory. The type of the allocated items is given by the type of data.
usage_tag | A tag the specifies the purpose for the allocated memory. Values: Allocator Usage
Return Values
data | Pointer to allocated memory. Remarks: The value of this pointer is overwritten by the function.
Remarks The function allocates at least count*sizeof(data) bytes. The allocated memory is large enough to hold count objects of type T, where T * is type of data. Note: These objects are not constructed by allocate. Use e.g. one of the functions valueConstruct, arrayConstruct, arrayConstructCopy or arrayFill to construct the objects. A new operator which is part of the C++ standard (defined in <new>) can also be used to construct objects at a given memory address. ..note:All allocated memory blocks should be deallocated by the corresponding function deallocate. Example Programs Allocators Part of Concept Allocator See Also Allocator Usage, arrayConstruct, arrayConstructCopy, arrayFill, clear, deallocate, ToStdAllocator, valueConstruct SeqAn - Sequence Analysis Library - www.seqan.de