Changeset 4b24dc8 in git for Singular/mmstd.c


Ignore:
Timestamp:
Jan 24, 2001, 5:54:04 PM (23 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4e69082e0209f82df529824514e15aea87df0b8e
Parents:
743f966818cf48c82bf4229a7c697ff3e1b327d2
Message:
win adoption


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

Legend:

Unmodified
Added
Removed
  • Singular/mmstd.c

    r743f96 r4b24dc8  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mmstd.c,v 1.1 2000-11-20 10:18:56 hannes Exp $ */
     4/* $Id: mmstd.c,v 1.2 2001-01-24 16:54:04 levandov Exp $ */
    55/*
    66* ABSTRACT: standard version of C-memory management alloc func
     
    1414// define this so that all addr allocated there are marked
    1515// as static, i.e. not metioned by omPrintUsedAddr
     16#ifndef ix86_Win
    1617#define OM_MALLOC_MARK_AS_STATIC
    1718#include <omalloc.c>
     19#else
     20#include <stdlib.h>
     21void freeSize(void* addr, size_t size)
     22{
     23  if (addr) free(addr);
     24}
     25
     26void* reallocSize(void* old_addr, size_t old_size, size_t new_size)
     27{
     28  if (old_addr && new_size)
     29  {
     30   return realloc(old_addr, new_size);
     31  }
     32  else
     33  {
     34    freeSize(old_addr, old_size);
     35    return malloc(new_size);
     36  }
     37}
     38#endif
Note: See TracChangeset for help on using the changeset viewer.