fieker-DuValspielwiese
Last change
on this file since 22b156 was
0e5dde,
checked in by Olaf Bachmann <obachman@…>, 25 years ago
|
* introduces EXTERNAL_MEMORY (--with-malloc=HEADER)
git-svn-id: file:///usr/local/Singular/svn/trunk@2691 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
926 bytes
|
Line | |
---|
1 | /**************************************************************** |
---|
2 | * |
---|
3 | * FILE: MP_Memory.c |
---|
4 | * |
---|
5 | * This is simply to initialize the memory functions. |
---|
6 | * |
---|
7 | ***************************************************************/ |
---|
8 | |
---|
9 | #include "MP.h" |
---|
10 | |
---|
11 | #ifndef EXTERNAL_MALLOC_H |
---|
12 | |
---|
13 | #include <stdlib.h> |
---|
14 | |
---|
15 | void mfree(void *mm, size_t sz) |
---|
16 | { |
---|
17 | free(mm); |
---|
18 | } |
---|
19 | |
---|
20 | void* mrealloc(void *mm, size_t s1, size_t s2) |
---|
21 | { |
---|
22 | return realloc(mm, s1); |
---|
23 | } |
---|
24 | |
---|
25 | void* (*IMP_MemAllocFnc)(size_t) = malloc; |
---|
26 | void* (*IMP_MemReallocFnc)(void *, size_t, size_t) = mrealloc; |
---|
27 | void (*IMP_MemFreeFnc)(void *, size_t) = mfree; |
---|
28 | |
---|
29 | void* (*IMP_RawMemAllocFnc) _ANSI_ARGS_((size_t)) = malloc; |
---|
30 | void* (*IMP_RawMemReallocFnc) _ANSI_ARGS_((void *, size_t)) = realloc; |
---|
31 | void (*IMP_RawMemFreeFnc) _ANSI_ARGS_((void *)) = free; |
---|
32 | |
---|
33 | #endif /* EXTERNAL_MALLOC_H */ |
---|
34 | |
---|
35 | |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.