similar to: memory allocation glitches

Displaying 20 results from an estimated 10000 matches similar to: "memory allocation glitches"

2002 Jun 18
1
can't find array overruns (was: help debugging segfaults)
Dear R-devel, Last week I got several responses to my question about debugging segfaults in my code (original post below). After I changed the S_alloc() calls to Calloc()/Free(), the symptom was gone, but I was told to keep looking. So I did: o Switched to Calloc/Free. Electric Fence did not find any problem. o Put assert(index < bound); assert(index >=0); everywhere in the C routine
2003 Dec 05
3
.C() memory allocation
I would like to retrieve a vector of integers from a call to .C(), but I don't know its length in advance. How do I do this without making an ugly safe guess? My vector is called "sequences". I am passing the argument sequences = integer(0) in the call to .C(), then declaring the corresponding argument as int *sequences in my C code. I tried R_alloc()ing the storage in C and
2004 Sep 14
3
memory allocation questions
Dear R-devel This one seems a bit arcane for R-help. I very often use R to call routines written in Delphi (son of Pascal), doing "persistent" memory allocation within Delphi. That is, I start R and load the Delphi DLL; then I use .C to call a Delphi routine which allocates a piece of memory X and returns to R a pointer to X; then I do some more stuff in R; then I call another Delphi
2009 Dec 21
2
Limit on number of times Realloc can be called?
Hello, I've been writing a program in C that will be called by R. I seem to have stumbled upon an odd error that seems to suggest there is a limit on the number of times "Realloc" (the R version as defined in the manual "R-extenstions" not the C version "realloc") when I try to use the following program: #include <R.h> #include <Rinternals.h> SEXP
2012 Nov 05
2
New Memory Allocation
In Syslinux-5.00, is the goal that the core and .c32 modules alike will use the same heap? There is a bug I am thinking about: - QEmu with 1024 MiB RAM - Syslinux 4.06 - .c32 can realloc() up to 1013 MiB - QEmu with 1024 MiB RAM - Syslinux 5.00-pre9 - .c32 can realloc() up to 45 MiB I am wondering if there's a maximum-allocation-size being hit, or if it's actually a bug I should look
2009 Oct 23
1
Confusion regarding allocating Matrices.
Hi I'm having slight confusion. I plan to grow/realloc a matrix depending on the data available in a C program. Here is what I'm tried to do: Data=allocMatrix(REALSXP,3,4); SEXP Data; REAL(Data)[8]=0.001123; REAL(Data)[200000]=0.001125; printf("%f %f\n\n\n\n",REAL(Data)[8],REAL(Data)[200000]); Here is my confusion: Do I always require to allocate the exact number of data
2017 Dec 26
3
Why is remalloc not marked as noalias?
Hello, According to my understanding, it seems that the result of realloc will not technically alias the original pointer. When the realloc is done in-place the reference <http://en.cppreference.com/w/c/memory/realloc> says: "The original pointer ptr is invalidated and any access to it is undefined behavior (even if reallocation was in-place)." Additionally from the C11 standard
2004 Sep 14
1
Memory allocation error: failed to expand to 1108555744 bytes
I saw the following log entry when connecting to a print share on a Samba 3.0.7 box from a Windows 2000 client. I assume the attempt to allocate 1Gb+ of RAM has got to be wrong? [2004/09/14 11:07:14, 1] smbd/service.c:make_connection_snum(648) pcladydeath (192.168.1.110) connect to service print$ initially as user pcnet (uid=288, gid=230) (pid 18501)[2004/09/14 11:07:17, 0]
2011 Jun 03
2
Arules: R Crashes when running eclat with tidLists=TRUE
Hello, I'm using the eclat function of the arules package (1.0-6) for the identification of frequent itemsets. I need the tidLists, but if I set in the function tidLists=TRUE R crashes (Windows XP Professional SP3, 32 bit, R version 2.12.1 (2010-12-16), reproducible on two different computers) with two different error messages or non at all. Minimum examples are: library(arules)
2006 Apr 13
2
Calloc : syntax error
Hi, I have issue with Calloc : at the compilation step, gcc tells "error : syntax error before ')' token". When I use the classical C calloc... free, everything's fine. Here's the part of code : a = (double*) Calloc(*n,sizeof(double)); when i remove this line or replace it with the calloc, it's ok Hint : In the header file R.h, there's a line : /* for PROBLEM
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
--- plugins/vddk/vddk.c | 41 +++++++++++++++++++++++++---------------- TODO | 1 - 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 87c0d146..d1a3015f 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -51,6 +51,7 @@ #include "isaligned.h" #include "minmax.h" #include
2005 Apr 07
3
R-beta 2004-04-07 build failed on AIX
I thought I'd give this another shot before the official release. I tried building R-beta_2004-04-07 on the AIX system that I have access to, and it seemed to failed at lazy-loading survival. I'd very much appreciate any pointer on what to try or look for next. 1. I set OBJECT_MODE to 64 for building 64-bit binary. 2. I edited config.site with the following: CC="xlc_r"
2013 Aug 25
3
libopusfile's memory management.
Would it be possible to include a re-export of the malloc, calloc, realloc, and free being used by opus file's implementation of OpusTags handling? This might seem redundant or ridiculous but I'm having difficulty getting the right versions that my compiler allows that's compatible with libopusfile. In the debugger I can see that the memory location that my malloc is returning is
2010 Oct 06
1
C code called from R: reallocate arrays passed as arguments?
Hello, I used to use a (somehow complicated) code in C and I have tried to adapt it to be called from R without making an excessive amount of changes. I am afraid I cannot post the code here, but I am going to try to describe the problem as accurately as possible. I have some arguments that are most of the cases required for internal C operations only; but as they are needed a few times as
2012 Mar 18
2
malloc/calloc/strdup and R's aequivalents
Hello, when looking at "Writing R Extensions" with mem-allocation in mind, I wondered, which functions to use to substitute malloc(), calloc(), realloc() and strdup() and free(). It looked like Calloc() or R_Calloc() might be useful for some of my tasks, but when trying to use R_Calloc() for example, I got some error messages which I don't see where they are coming from. Maybe I
2016 Oct 03
3
Default alignment for 'malloc'
On Mon, Oct 03, 2016 at 02:43:03PM +0200, Michael Kruse via llvm-dev wrote: > 2016-10-03 13:55 GMT+02:00 Martin J. O'Riordan via llvm-dev > <llvm-dev at lists.llvm.org>: > > I am trying to implement some new alignment based optimisations in our > > target backend, and I am wondering if there a way a target can specify that > > ‘malloc’, ‘realloc’ and ‘calloc’
2016 Oct 03
3
Default alignment for 'malloc'
I am trying to implement some new alignment based optimisations in our target backend, and I am wondering if there a way a target can specify that 'malloc', 'realloc' and 'calloc' always return a pointer to memory that is aligned to a particular boundary? Related too, is it possible to specify that the stack pointer always points to memory which is aligned to a
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
2020 Jun 07
3
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
On Sun, Jun 7, 2020 at 5:53 PM <luke-tierney at uiowa.edu> wrote: > > On Sun, 7 Jun 2020, peter dalgaard wrote: > > > So this wasn't tested for a month? > > > > Anyways, Free() is just free() with a check that we're not freeing a null pointer, followed by setting the pointer to NULL. At that point of tcltk.c, we have > > > > for (objc = i = 0;
2019 Sep 13
1
[PATCH nbdkit] common/bitmap: Don't fail on realloc (ptr, 0)
The following commands: nbdkit -fv --filter=cow memory size=512 --run 'qemu-img info $nbd' nbdkit -fv --filter=cache memory size=512 --run 'qemu-img info $nbd' both fail with: nbdkit: memory[1]: error: realloc: Success Initial git bisect pointed to commit 3166d2bcbfd2 (but I don't believe that commit is the real cause, it merely exposes the bug). The reason this