org.apache.ignite.internal.portable.streams

## Interface PortableMemoryAllocator

All Known Implementing Classes:
  PortableSimpleMemoryAllocator, PortableThreadLocalMemoryAllocator

    public interface PortableMemoryAllocator

Portable memory allocator.

### Field Summary

Fields
`static PortableMemoryAllocator` `DFLT_ALLOC` Default memory allocator.

### Method Summary

Methods
`byte[]` `allocate(int size)` Allocate memory.
`long` `allocateDirect(int size)` Allocate memory.
`byte[]` `reallocate(byte[] data, int size)` Reallocates memory.
`long` `reallocateDirect(long addr, int size)` Reallocate memory.
`void` `release(byte[] data, int maxMsgSize)` Release memory.
`void` `releaseDirect(long addr)` Release memory.

### Field Detail

#### DFLT_ALLOC

    static final PortableMemoryAllocator DFLT_ALLOC

Default memory allocator.

### Method Detail

#### allocate

    byte[] allocate(int size)

Allocate memory.

Parameters:
  `size` - Size.
Returns:
  Data.

#### reallocate

    byte[] reallocate(byte[] data,
                    int size)

Reallocates memory.

Parameters:
  `data` - Current data chunk.
  `size` - New size required.
Returns:
  Data.

#### release

    void release(byte[] data,
               int maxMsgSize)

Release memory.

Parameters:
  `data` - Data.
  `maxMsgSize` - Max message size sent during the time the allocator is used.

#### allocateDirect

    long allocateDirect(int size)

Allocate memory.

Parameters:
  `size` - Size.
Returns:
  Address.

#### reallocateDirect

    long reallocateDirect(long addr,
                        int size)

Reallocate memory.

Parameters:
  `addr` - Address.
  `size` - Size.
Returns:
  Address.

#### releaseDirect

    void releaseDirect(long addr)

Release memory.

Parameters:
  `addr` - Address.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015