Mercurial > hg > octave-nkf
comparison liboctave/oct-alloc.h @ 3219:30770ba4457a
[project @ 1998-11-13 03:44:31 by jwe]
author | jwe |
---|---|
date | Fri, 13 Nov 1998 03:44:36 +0000 |
parents | 8b262e771614 |
children | 23d06c9e1edd |
comparison
equal
deleted
inserted
replaced
3218:2c91af0db179 | 3219:30770ba4457a |
---|---|
57 | 57 |
58 // How to grow the free list. | 58 // How to grow the free list. |
59 bool grow (void); | 59 bool grow (void); |
60 }; | 60 }; |
61 | 61 |
62 #define DECLARE_OCTAVE_ALLOCATOR \ | |
63 public: \ | |
64 void *operator new (size_t size) { return allocator.alloc (size); } \ | |
65 void operator delete (void *p, size_t size) { allocator.free (p, size); } \ | |
66 private: \ | |
67 static octave_allocator allocator; | |
68 | |
69 #define DEFINE_OCTAVE_ALLOCATOR(t) \ | |
70 octave_allocator t::allocator (sizeof (t)) | |
71 | |
72 #define DEFINE_OCTAVE_ALLOCATOR2(t, s) \ | |
73 octave_allocator t::allocator (sizeof (t), s) | |
74 | |
62 #endif | 75 #endif |
63 | 76 |
64 /* | 77 /* |
65 ;;; Local Variables: *** | 78 ;;; Local Variables: *** |
66 ;;; mode: C++ *** | 79 ;;; mode: C++ *** |