⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 realloc.c

📁 a software code for computing selected eigenvalues of large sparse symmetric matrices
💻 C
字号:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <ilupack.h>#include <ilupackmacros.h>void *REALLOC(void *ptr, size_t nbytes, char *msg ){ /* allocates space -- or exits in case of     failure */  if (nbytes == 0)    return NULL;  if (ptr==NULL)     ptr = (void *) malloc(nbytes);  else     ptr = (void *) realloc(ptr,nbytes);  if (ptr == NULL) {    fprintf(stderr,"Mem. re-alloc. ERROR in %s. Requested bytes: %ld bytes\n",            msg, (long)nbytes );    fflush(stderr);     exit( -1 );  }  return ptr;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -