Displaying 20 results from an estimated 1000 matches similar to: "R_alloc segfaults"
2005 Mar 10
1
R_alloc with more than 2GB (PR#7721)
Full_Name: Wolfgang Huber
Version: R-devel_2005-03-10
OS: alphaev68-dec-osf4.0f
Submission from: (NULL) (62.253.128.15)
This report concerns allocation of large (>2^31 byte) chunks of memory with
R_alloc. I suspect it is a bug/typo but please don't hate me if it's actually a
feature:
In R, I can happily create large matrices:
> a= matrix(0, nrow=191481, ncol=3063)
> dim(a)
[1]
1997 Jul 28
0
R-alpha: R 0.50.a1 S_alloc BUG, priority = URGENT
The current version of S_alloc in src/main/memory.c is
char *S_alloc(long nelem, int eltsize)
{
unsigned int i, size;
char *p = R_alloc(nelem, eltsize);
for(i=0 ; i<size; i++)
p[i] = 0;
return p;
}
which segfaults because `size' is not initialized. I am not what the
right fix is, adding
size = nelem * eltsize;
before the loop seems to work.
As an aside ... I think the seed*
2006 Mar 15
1
R_alloc problem on Mac OSX (PR#8683)
Full_Name: Dan Kelley
Version: 2.2.1
OS: Mac OSX
Submission from: (NULL) (129.173.23.36)
I'm having difficulties getting R_alloc() to work on a 64-bit Mac running R
2.2.1 installed via a .dmg file obtained from the R site. Details are given
below, in a level of detail that I hope is appropriate. My eye was particularly
drawn to line #2 in the gdb 'where' output, but line #1 seems
2004 Mar 30
5
optim-Bug (PR#6720)
Full_Name: Dr. Hans A. Kestler
Version: 1.8.1.
OS: Linux, Win, Mac OSX
Submission from: (NULL) (134.60.73.116)
The code below produces after a different number of iterations i the following
error:
Error in optim(par = rep(0.5, length(edges)), loglik, method = "L-BFGS-B", :
non-finite value supplied by optim
This was reproducible on different machines (Mac G4 OSX, AMD Opteron
2006 Mar 13
0
R_alloc problem (Mac OSX)
Hello. I'm having difficulties getting R_alloc() to work.
The test platform is a 64-bit Mac running R 2.2.1 installed via
a .dmg file obtained from the R site. Details are given below, in a
level of detail that I hope is appropriate. My eye was particularly
drawn to line #2 in the gdb 'where' output, but line #1 seems
sensible so I may just be displaying my ignorance by
1998 Jan 21
2
alloc
I am trying to get our database interface (PADI) working with R. The code does
some memory allocation and for Splus there is an ifdef which controls whether
malloc or S_alloc is called. I did nm R.binary | grep alloc to see if this was
supported and I find there are some choices:
[2490] | 446036| 272|FUNC |GLOB |0 |7 |R_alloc
[806] | 693956| 312|FUNC |LOCL |0 |7
2009 Jul 20
3
S_alloc or Calloc for return value
I am trying to write a C function to create a vector of integers that can be
used by the R calling function. I do not know the size of the vector in the
R calling function. (Well, actually, I have an upper limit on the size, but
that is so large that R cannot allocate it. What I'm doing in the function
is to do a sieving procedure, and the result will be small enough to fit
into my
2008 Mar 05
1
R_alloc with structures with "flexible array members"
Dear All,
In a package, I want to use some C code where I am using a structure
(as the basic element of a linked list) with flexible array members.
Basically, this is a structure where the last component is an
incomplete array type (e.g., Harbison & Steel, "C, a reference
manual, 5th ed.", p. 159) such as:
struct Sequence {
struct Sequence *next;
int len;
unsigned int
2011 Dec 21
1
When exactly do I need R_alloc when using the .Call() interface?
Hi,
I am trying to implement an algorithm in C which will be called via the
.Call() interface.
While reading the 'Writing R Extension' manual, I stumbled upon the
R_alloc() function for allocating storage for C objects. The manual says
it should be used to allocate storage if an C object is needed/created
while manipulating R objects within a function called via the .Call()
interface.
2006 Sep 12
1
[LLVMdev] ICE in LLVM GCC4 Front End
[Reposted from llvm-bugs mailing list. Also has an updated, hopefully
better, patch associated with it.]
Hi,
The following program causes the LLVM GCC4 front end to ICE:
struct A {
virtual ~A();
};
template <typename Ty>
struct B : public A {
~B () { delete [] val; }
private:
Ty* val;
};
template <typename Ty>
struct C : public A {
C ();
~C ();
};
template
2016 Jan 04
2
R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"
The bulk is on my forums - the final post for today is:
Results to date:
A. It looks like I am going to need a newer compiler for C - xlc/xlC V11
apparently does not understand this code:
"/data/prj/cran/R-3.2.3/src/main/memory.c", line 2149.31: 1506-046 (S)
Syntax error.
I will have to check if R-devel has different code before asking for
assistence.
+2139 #ifdef
2004 Dec 30
1
optim/vmmin and R_alloc
I am calling 'vmmin' several times from a C function (which is called via
.C). It works very well, except for memory consumption. The cause is that
vmmin allocates memory via R_alloc, and this memory is not freed as vmmin
exits. Instead all the allocated memory is freed on return of the .C
call.
In one application, I have 2000 functions of 500 variables each to
minimize. In each call to
2008 Apr 11
1
R_alloc vs. malloc
Dear list
I have two (trivial) memory-questions related to a call with .C:
If I allocate memory with R_alloc in a C-program (called with .C), will that memory "be taken from" the "available memory pool" (of a maximum of 4gb?) which R can allocate? (This is the impression I get from "Writing R extensions".)
If instead I use malloc; will that memory then be taken
2016 Jan 05
0
R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"
On 04-Jan-16 23:24, Michael Felt wrote:
> The bulk is on my forums - the final post for today is:
>
> Results to date:
>
> A. It looks like I am going to need a newer compiler for C - xlc/xlC
> V11 apparently does not understand this code:
>
> "/data/prj/cran/R-3.2.3/src/main/memory.c", line 2149.31: 1506-046 (S)
> Syntax error.
>
> I will have to check
2014 Sep 07
1
lbfgsb from C/C++
Hi,
I would like to call R's lbfgsb function from my C/C++ code by including
R_ext/Applic.h and linking against libR.
Currently, I am allocating memory for x (and the other input arrays for
lbfgsb) in my C/C++ code via malloc/new. However, this gives a segmentation
fault when executing the program.
I tried to allocate x via PROTECT(x = NEW_NUMERIC(n)); x_p =
NUMERIC_POINTER(x);.
This compiles
2006 Jul 21
0
(no subject)
Hi,
I am having problems when trying to apply factor analysis in a covariance matrix,
> factanal(covmat=strip1cmcd, factors=5, control=list(lower=0.0264))
Error in optim(start, FAfn, FAgr, method = "L-BFGS-B", lower = lower, :
non-finite value supplied by optim
In addition: Warning message:
NaNs produced in: sqrt(diag(cv))
I have searched for possible solutions in
2002 Jun 13
3
[R] help debugging segfaults
Hi all,
Thanks to Prof. Ripley, Prof. Gentleman, and Simon Wood (did I miss
anyone?). The problem seemed to have gone away.
Everyone suggested using some malloc debugger (such as Electric Fence). All
I did was following half of what BDR suggested below, i.e., changing all the
S_alloc() calls to Calloc() and Free(). I didn't get to try efence, and the
problem seems to have disappeared!
As
2007 Aug 06
3
Error in using nlevels in apply function
Dear R users,
I am currently trying to create my first personnal function and use it
with the apply function. The purpose of this function is to create a
vector summarizing the number of levels in a given selection of
data.frame columns.
I tried to transpose the indexation method used by the nlevels function
but it doesn't seem to work. I did not find anything uesful in the
archives so
2002 Jan 17
2
Solaris 2.6 Compile (PR#1268)
Full_Name: Geordon Marchak
Version: R-1.3.1
OS: Solaris 2.6
Submission from: (NULL) (199.67.239.91)
Got the following error when compiling on Solaris 2.6 with the standard GNU
gcc package (from the Sun site). BTW - linux compiles no problem (and fast
too :-)
# make
`Makedeps' is up to date.
gcc -I. -I../../src/include -I../../src/include -I/usr/local/include
-DHAVE_CONFIG_H -g -O2 -c
2002 May 06
2
compiling on Solaris 7 (PR#1520)
Full_Name: Chris Pelton
Version: R-1.5.0
OS: Solaris &
Submission from: (NULL) (169.237.121.210)
I am unable to compile R-1.5.0, and am getting the following errors with make. I
searched through
the buglist and didn't see anything similar, although I wouldn't doubt if I was
just
using the wrong version of something.
gcc version 3.0.3
gcc -I. -I../../src/include