source: git/MP/MP/MP_Memory.c @ 1d0eb7

fieker-DuValspielwiese
Last change on this file since 1d0eb7 was 0e5dde, checked in by Olaf Bachmann <obachman@…>, 26 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
15void mfree(void *mm, size_t sz)
16{
17  free(mm);
18}
19
20void* mrealloc(void *mm, size_t s1, size_t s2)
21{
22  return realloc(mm, s1);
23}
24
25void* (*IMP_MemAllocFnc)(size_t) = malloc;
26void* (*IMP_MemReallocFnc)(void *, size_t, size_t) = mrealloc;
27void  (*IMP_MemFreeFnc)(void *, size_t) = mfree;
28
29void* (*IMP_RawMemAllocFnc) _ANSI_ARGS_((size_t)) = malloc;
30void* (*IMP_RawMemReallocFnc) _ANSI_ARGS_((void *, size_t)) = realloc;
31void  (*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.