GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
octave_allocator Class Reference

#include "oct-alloc.h"

Collaboration diagram for octave_allocator:
Collaboration graph
[legend]

Classes

struct  link

Public Member Functions

 octave_allocator (size_t item_sz, int grow_sz=256)
voidalloc (size_t size)
void free (void *p, size_t size)

Private Member Functions

bool grow (void)

Private Attributes

int grow_size
linkhead
size_t item_size

Detailed Description

Definition at line 28 of file oct-alloc.h.

Constructor & Destructor Documentation

octave_allocator::octave_allocator ( size_t  item_sz,
int  grow_sz = 256 
)
inline

Definition at line 34 of file oct-alloc.h.

Member Function Documentation

void * octave_allocator::alloc ( size_t  size)

Definition at line 32 of file oct-alloc.cc.

References grow(), head, item_size, octave_allocator::link::next, and size().

void octave_allocator::free ( void p,
size_t  size 
)

Definition at line 52 of file oct-alloc.cc.

References head, item_size, and octave_allocator::link::next.

bool octave_allocator::grow ( void  )
private

Definition at line 67 of file oct-alloc.cc.

References f, grow_size, head, item_size, next, and void().

Referenced by alloc().

Member Data Documentation

int octave_allocator::grow_size
private

Definition at line 55 of file oct-alloc.h.

Referenced by grow().

link* octave_allocator::head
private

Definition at line 52 of file oct-alloc.h.

Referenced by alloc(), free(), and grow().

size_t octave_allocator::item_size
private

Definition at line 59 of file oct-alloc.h.

Referenced by alloc(), free(), and grow().


The documentation for this class was generated from the following files: