Skip Headers
Oracle® Database XML C++ API Reference
11g Release 1 (11.1)

B28389-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

MemAllocator Interface

Table 1-2 summarizes the methods available through the MemAllocator interface.

Table 1-2 Summary of MemAllocator Methods; Ctx Package

Function Summary

alloc()

Allocates memory of given size.

dealloc()

Deallocate memory pointed to by the argument.

~MemAllocator()

Virtual destructor - interface level handle to actual destructors.



alloc()

This is a virtual member function that defines a prototype for user defined allocator functions

Syntax

virtual void* alloc(
   ub4 size) = 0;
Parameter Description
size
memory size


dealloc()

This is a virtual member function that defines a prototype for user defined deallocator functions. Such deallocators are supposed to deallocate memory allocated by the alloc member functions

Syntax

virtual void dealloc(
   void* ptr) = 0;
Parameter Description
ptr
pointer to previously allocated memory


~MemAllocator()

It provides an interface level handle to actual destructors that can be invoked without knowing their names or implementations

Syntax

virtual ~MemAllocator() {}