hydrocode_Radial_Lag 0.3
This is an implementation of fully explict forward Euler scheme for multi-D radially symmetric compressible flows on Lagrangian coordinate
mem.h
浏览该文件的文档.
1
7#ifndef MEM_INCLUDED
8#define MEM_INCLUDED
9#include "except.h"
10extern const Except_T Mem_Failed;
11extern void *Mem_alloc (long nbytes,
12 const char *file, int line);
13extern void *Mem_calloc(long count, long nbytes,
14 const char *file, int line);
15extern void Mem_free(void *ptr,
16 const char *file, int line);
17extern void *Mem_resize(void *ptr, long nbytes,
18 const char *file, int line);
19#define ALLOC(nbytes) \
20 Mem_alloc((nbytes), __FILE__, __LINE__)
21#define CALLOC(count, nbytes) \
22 Mem_calloc((count), (nbytes), __FILE__, __LINE__)
23#define NEW(p) ((p) = ALLOC((long)sizeof *(p)))
24#define NEW0(p) ((p) = CALLOC(1, (long)sizeof *(p)))
25#define FREE(ptr) ((void)(Mem_free((ptr), \
26 __FILE__, __LINE__), (ptr) = 0))
27#define RESIZE(ptr, nbytes) ((ptr) = Mem_resize((ptr), \
28 (nbytes), __FILE__, __LINE__))
29#endif
This file is a header file of source codes in the book 'C Interfaces and Implementations'.
void * Mem_calloc(long count, long nbytes, const char *file, int line)
Definition: mem.c:25
const Except_T Mem_Failed
Definition: mem.c:11
void * Mem_alloc(long nbytes, const char *file, int line)
Definition: mem.c:12
void Mem_free(void *ptr, const char *file, int line)
Definition: mem.c:40
void * Mem_resize(void *ptr, long nbytes, const char *file, int line)
Definition: mem.c:44