source: branches/port5/CONSENSUS_TREE/CT_mem.cxx

Last change on this file was 6143, checked in by westram, 15 years ago
  • backport [6141] (parts changing code, but only strings and comments)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 316 bytes
Line 
1/* memory handling */
2
3#include <stdlib.h>
4#include <string.h>
5#include <stdio.h>
6
7void *getmem(size_t size)
8{
9    void *p;
10
11    p = malloc(size);
12
13    if (!p) {
14        fprintf(stderr, "Error occurred in Module CONSENSUS! Not enough Memory left\n");
15        return 0;
16    }
17
18    memset(p, 0, size);
19    return p;
20}
Note: See TracBrowser for help on using the repository browser.