fieker-DuValspielwiese
Last change
on this file since cf5fc11 was
35aab3,
checked in by Hans Schönemann <hannes@…>, 21 years ago
|
This commit was generated by cvs2svn to compensate for changes in r6879,
which included commits to RCS files with non-trunk default branches.
git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
784 bytes
|
Rev | Line | |
---|
[35aab3] | 1 | /**************************************** |
---|
| 2 | * Computer Algebra System SINGULAR * |
---|
| 3 | ****************************************/ |
---|
| 4 | /* $Id: mmalloc.cc,v 1.1.1.1 2003-10-06 12:15:57 Singular Exp $ */ |
---|
| 5 | /* |
---|
| 6 | * ABSTRACT: standard version of C++-memory management alloc func |
---|
| 7 | */ |
---|
| 8 | #include <stdlib.h> |
---|
| 9 | |
---|
| 10 | #include "mod2.h" |
---|
| 11 | |
---|
| 12 | #include <omalloc.h> |
---|
| 13 | |
---|
| 14 | /* We define those, so that our values of |
---|
| 15 | OM_TRACK and OM_CHECK are used */ |
---|
| 16 | void* operator new ( size_t size ) |
---|
| 17 | { |
---|
| 18 | void* addr; |
---|
| 19 | if (!size) size = 1; |
---|
| 20 | omTypeAlloc(void*, addr, size); |
---|
| 21 | return addr; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | void operator delete ( void* block ) |
---|
| 25 | { |
---|
| 26 | omfree( block ); |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | void* operator new[] ( size_t size ) |
---|
| 30 | { |
---|
| 31 | void* addr; |
---|
| 32 | if (! size) size = 1; |
---|
| 33 | omTypeAlloc(void*, addr, size); |
---|
| 34 | return addr; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | void operator delete[] ( void* block ) |
---|
| 38 | { |
---|
| 39 | omfree( block ); |
---|
| 40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.