3 /* gras/sysdep.h -- all system dependency */
4 /* no system header should be loaded out of this file so that we have only */
5 /* one file to check when porting to another OS */
7 /* Authors: Martin Quinson */
8 /* Copyright (C) 2004 the OURAGAN project. */
10 /* This program is free software; you can redistribute it and/or modify it
11 under the terms of the license (GNU LGPL) which comes with this package. */
13 #include "gras_private.h"
17 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(sysdep, gros, "System dependency");
20 **** Memory management
23 void* gras_malloc (long int bytes) {
24 return bytes == 0 ? NULL : (void*) malloc ((size_t) bytes);
26 void* gras_malloc0 (long int bytes) {
27 return bytes == 0 ? NULL : (void*) calloc ((size_t) bytes, 1);
30 void* gras_realloc (void *memory, long int bytes) {
35 return (void*) realloc (memory, (size_t) bytes);
39 void gras_free (void *memory) {
49 void gras_abort(void) {