00001 /* 00002 Copyright (C) 2006. QLogic Corporation. All Rights Reserved. 00003 00004 Copyright 2006 PathScale, Inc. All Rights Reserved. 00005 00006 This program is free software; you can redistribute it and/or modify it 00007 under the terms of version 2 of the GNU General Public License as 00008 published by the Free Software Foundation. 00009 00010 This program is distributed in the hope that it would be useful, but 00011 WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 00014 Further, this software is distributed without any warranty that it is 00015 free of the rightful claim of any third person regarding infringement 00016 or the like. Any license provided herein, whether implied or 00017 otherwise, applies only to this software file. Patent licenses, if 00018 any, provided herein do not apply to combinations of this program with 00019 other software, or any other product whatsoever. 00020 00021 You should have received a copy of the GNU General Public License along 00022 with this program; if not, write the Free Software Foundation, Inc., 59 00023 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00024 */ 00025 00026 #include <stdio.h> 00027 #include <stdlib.h> 00028 00030 // 00031 // Wrappers around calloc (3) and free (3): 00032 // 00034 00035 void *gs_alloc (size_t nmemb, size_t size) 00036 { 00037 void *p = NULL; 00038 p = calloc (nmemb, size); 00039 if (p == NULL) fprintf (stderr, "Out of memory.\n"); 00040 return p; 00041 }
1.5.6