RAPI
R_ext/Memory.h
Go to the documentation of this file.
00001 /*
00002  *  R : A Computer Language for Statistical Data Analysis
00003  *  Copyright (C) 1998-2016  The R Core Team
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU Lesser General Public License as published by
00007  *  the Free Software Foundation; either version 2.1 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Lesser General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Lesser General Public License
00016  *  along with this program; if not, a copy is available at
00017  *  https://www.R-project.org/Licenses/
00018  *
00019  *
00020  * Memory Allocation (garbage collected) --- INCLUDING S compatibility ---
00021  */
00022 
00023 /* Included by R.h: API */
00024 
00025 #ifndef R_EXT_MEMORY_H_
00026 #define R_EXT_MEMORY_H_
00027 
00028 #ifndef NO_C_HEADERS
00029 # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
00030 #  include <cstddef>
00031 using std::size_t;
00032 # else
00033 #  include <stddef.h> /* for size_t */
00034 # endif
00035 #endif
00036 
00037 #ifdef  __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 void*   vmaxget(void);
00042 void    vmaxset(const void * ovmax);
00043 
00044 void    R_gc(void);
00045 int R_gc_running();
00046 
00047 char*   R_alloc(size_t nelem, int eltsize);
00048 long double *R_allocLD(size_t nelem);
00049 char*   S_alloc(long nelem, int eltsize);
00050 char*   S_realloc(char * p, long new, long old, int size);
00051 
00052 #ifdef  __cplusplus
00053 }
00054 #endif
00055 
00056 #endif /* R_EXT_MEMORY_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines