Classes | Public Member Functions | Private Member Functions | Private Attributes

octave_allocator Class Reference

#include "oct-alloc.h"

Collaboration diagram for octave_allocator:
Collaboration graph
[legend]

List of all members.

Classes

struct  link

Public Member Functions

 octave_allocator (size_t item_sz, int grow_sz=256)
void * alloc (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, and octave_allocator::link::next.

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, and next.

Referenced by alloc().


Member Data Documentation

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

Referenced by grow().

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:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines