Changeset 747dce in git for Singular/mmstd.c


Ignore:
Timestamp:
Feb 15, 2001, 1:58:17 PM (23 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
358fa445d664957214f7dfb5b5237c8d2b30b251
Parents:
7df57804d761a89bf836bda602393775154535cb
Message:
win adoption


git-svn-id: file:///usr/local/Singular/svn/trunk@5236 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/mmstd.c

    r7df5780 r747dce  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mmstd.c,v 1.3 2001-01-27 17:04:59 obachman Exp $ */
     4/* $Id: mmstd.c,v 1.4 2001-02-15 12:58:17 levandov Exp $ */
    55/*
    66* ABSTRACT: standard version of C-memory management alloc func
     
    1111
    1212#define OM_NO_MALLOC_MACROS
     13#ifdef ix86_Win
     14#define OMALLOC_USES_MALLOC
     15#endif
    1316#include "omalloc.h"
    1417
     
    2225#define OM_MALLOC_MARK_AS_STATIC
    2326#include <omalloc.c>
     27#else
     28#include <stdlib.h>
     29void freeSize(void* addr, size_t size)
     30{
     31  if (addr) free(addr);
     32}
     33
     34void* reallocSize(void* old_addr, size_t old_size, size_t new_size)
     35{
     36  if (old_addr && new_size)
     37  {
     38   return realloc(old_addr, new_size);
     39  }
     40  else
     41  {
     42    freeSize(old_addr, old_size);
     43    return malloc(new_size);
     44  }
     45}
    2446#endif
     47
Note: See TracChangeset for help on using the changeset viewer.