spielwiese
Last change
on this file since b1dfaf was
341696,
checked in by Hans Schönemann <hannes@…>, 14 years ago
|
Adding Id property to all files
git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
748 bytes
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C -*- */ |
---|
2 | /* $Id$ */ |
---|
3 | |
---|
4 | #ifndef INCL_MEMUTIL_H |
---|
5 | #define INCL_MEMUTIL_H |
---|
6 | |
---|
7 | #define _POSIX_SOURCE 1 |
---|
8 | |
---|
9 | #include <config.h> |
---|
10 | |
---|
11 | #include <stdlib.h> |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | extern "C" { |
---|
15 | #endif |
---|
16 | |
---|
17 | void* getBlock ( size_t size ); |
---|
18 | |
---|
19 | void freeBlock ( void * block, size_t size ); |
---|
20 | |
---|
21 | void* reallocBlock ( void * block, size_t oldsize, size_t newsize ); |
---|
22 | |
---|
23 | #ifdef __cplusplus |
---|
24 | struct memman_new_delete |
---|
25 | { |
---|
26 | inline void* operator new( size_t size ) { return getBlock( size ); } |
---|
27 | inline void* operator new []( size_t size ) { return getBlock( size ); } |
---|
28 | inline void operator delete( void* block ) { freeBlock( block, 0 ); } |
---|
29 | inline void operator delete []( void* block ) { freeBlock( block, 0 ); } |
---|
30 | }; |
---|
31 | } |
---|
32 | #endif |
---|
33 | |
---|
34 | #endif /* ! INCL_MEMUTIL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.