The R Project SVN R

Rev

Rev 87333 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7727 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
87333 ripley 3
 *  Copyright (C) 1998-2024  The R Core Team
7727 ripley 4
 *
71657 plummer 5
 *  This header file is free software; you can redistribute it and/or modify
12778 pd 6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
7727 ripley 8
 *  (at your option) any later version.
9
 *
71657 plummer 10
 *  This file is part of R. R is distributed under the terms of the
11
 *  GNU General Public License, either Version 2, June 1991 or Version 3,
12
 *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
13
 *
7727 ripley 14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12778 pd 17
 *  GNU Lesser General Public License for more details.
7727 ripley 18
 *
12778 pd 19
 *  You should have received a copy of the GNU Lesser General Public License
42308 ripley 20
 *  along with this program; if not, a copy is available at
68949 ripley 21
 *  https://www.R-project.org/Licenses/
7727 ripley 22
 *
23
 *
24
 * Memory Allocation (garbage collected) --- INCLUDING S compatibility ---
25
 */
26
 
86515 luke 27
/* Included by R.h: Part of the API. */
60253 ripley 28
 
11211 ripley 29
#ifndef R_EXT_MEMORY_H_
30
#define R_EXT_MEMORY_H_
7727 ripley 31
 
71371 ripley 32
#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
33
# include <cstddef>
71379 ripley 34
# define R_SIZE_T std::size_t
71289 ripley 35
#else
71371 ripley 36
# include <stddef.h> /* for size_t */
71379 ripley 37
# define R_SIZE_T size_t
42409 ripley 38
#endif
41914 ripley 39
 
11211 ripley 40
#ifdef  __cplusplus
41
extern "C" {
42
#endif
43
 
87333 ripley 44
void*	vmaxget(void); // not remapped
45
void	vmaxset(const void *); // not re-mapped
7727 ripley 46
 
7749 ripley 47
void	R_gc(void);
89135 luke 48
#ifdef USE_BASE_R_SUPPORT
82754 ripley 49
int	R_gc_running(void);
89135 luke 50
#endif
7727 ripley 51
 
71379 ripley 52
char*	R_alloc(R_SIZE_T, int);
53
long double *R_allocLD(R_SIZE_T nelem);
7727 ripley 54
char*	S_alloc(long, int);
41869 ripley 55
char*	S_realloc(char *, long, long, int);
7727 ripley 56
 
74864 luke 57
void *  R_malloc_gc(size_t);
58
void *  R_calloc_gc(size_t, size_t);
59
void *  R_realloc_gc(void *, size_t);
60
 
11211 ripley 61
#ifdef  __cplusplus
62
}
7727 ripley 63
#endif
11211 ripley 64
 
65
#endif /* R_EXT_MEMORY_H_ */