search for: callocated

Displaying 20 results from an estimated 920 matches for "callocated".

Did you mean: allocated
2015 Jun 18
1
[PATCH] error log: keep more calloc and its error messages match
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- cat/cat.c | 4 ++-- cat/ls.c | 4 ++-- daemon/md.c | 2 +- daemon/stat.c | 2 +- daemon/xattr.c | 2 +- df/main.c | 4 ++-- edit/edit.c | 4 ++-- fish/fish.c | 6 +++--- fish/options.c | 4 ++-- inspector/inspector.c | 4 ++-- rescue/rescue.c
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
2005 Dec 29
1
Problems with calloc function.
Hi all, I have a C code in Linux, it has 7 pointers and compile e run OK, but when I run in R happens problems with calloc function, it returns NULL. ############################################### > int *temp1,*temp2,*temp3,*temp4; temp1 = (int *)calloc(col,sizeof(int)); if(temp1 == NULL){ printf("\n\n No Memory1!"); exit(1); } temp2 = (int *)calloc(col,sizeof(int));
2024 Aug 13
1
[PATCH] Reorder calloc arguments
Reordering calloc arguments silences gcc compiler warnings of latest versions. Spotted with OpenSSH-portable on a Linux system. Okay? Index: cipher.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/cipher.c,v diff -u -p -u -p -r1.121 cipher.c --- cipher.c 17 May 2024 02:39:11 -0000 1.121 +++ cipher.c 13 Aug 2024 16:46:00 -0000 @@ -249,7 +249,7
2006 Apr 17
1
[patch] calloc arguments
Hi, it looks like a few users of calloc had their arguments backwards. I checked the other users and they seem fine. Since one of those is in ioemu code, does that mean we (I?) will be submitting that bug to qemu upstream? -- Hollis Blanchard IBM Linux Technology Center Fix swapped calloc() arguments. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> diff -r c4eead8a925b
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
2015 Jun 17
2
[PATCH] btrfs: keep calloc and its error message match
commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d left some error messages unchanged. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 7b14bac..e8059db 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -479,7 +479,7 @@ do_btrfs_subvolume_list (const
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;
2020 Jun 07
4
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
I've committed the change to use Free instead of free in tcltk.c and sys-std.c (r78652 for R-devel, r78653 for R-patched). We might consider either moving Calloc/Free out of the Windows remapping or moving the remapping into header files so everything seeing our header files uses our calloc/free. Either would be less brittle that the current status. Best, luke On Sun, 7 Jun 2020, peter
2020 Jun 07
5
use of the tcltk package crashes R 4.0.1 for Windows
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; i < length(avec); i++){ const char *s; char *tmp; if (!isNull(nm) && strlen(s = translateChar(STRING_ELT(nm, i)))){ // tmp =
2020 Jun 07
0
[External] use of the tcltk package crashes R 4.0.1 for Windows
Ah, I see it now: The remapping of free() to Rm_free() and calloc() to Rm_calloc() happens in memory.c, but not in tcltk.c; the macro Calloc in R_ext/RS.h maps to a call to R_chk_alloc which is defined in memory.h; RS.h is included in tcltk.c, so tcltk.c winds up calling Rm_calloc() via Calloc(), but then the NON-remapped free(), and the walls come tumbling down. If the "#if
2015 Aug 27
2
[Mesa-dev] gallium state tracker calls calloc for 0 sizes arrays ?
Hi, On 27-08-15 15:46, Marek Olšák wrote: > On Thu, Aug 27, 2015 at 3:09 PM, Hans de Goede <hdegoede at redhat.com> wrote: >> Hi All, >> >> While debugging: https://bugzilla.redhat.com/show_bug.cgi?id=1008089 >> >> I made a apitrace recording of the a single slide transition >> animation, and since I suspected memory corruption replayed >> it
2015 Aug 27
2
gallium state tracker calls calloc for 0 sizes arrays ?
Hi All, While debugging: https://bugzilla.redhat.com/show_bug.cgi?id=1008089 I made a apitrace recording of the a single slide transition animation, and since I suspected memory corruption replayed it using ElectrFence + glretrace, this finds a 0 sized array allocation at src/mesa/state_tracker/st_glsl_to_tgsi.cpp: 5565: if (proginfo->Parameters) { t->constants = (struct
2015 Jun 17
0
Re: [PATCH] btrfs: keep calloc and its error message match
On Wednesday 17 June 2015 10:44:09 Chen Hanxiao wrote: > commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d > left some error messages unchanged. That commit was about converting a couple of malloc+memset to calloc, not about replacing messages in other parts. Hence, this note is wrong. > > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 4
2005 Dec 14
1
R-beta on AIX5.2
I build R-beta on AIX5.2 is failed. make[3]: Entering directory `/home/nakama/Rbeta/R-beta/src/nmath' xlc_r -I. -I../../src/include -I../../src/include -I/usr/local/include -I/opt/freeware/include -DHAVE_CONFIG_H -q64 -I/usr/local/include -I/opt/freeware/include -O2 -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -c mlutils.c -o mlutils.o "nmath.h", line 50.9: 1506-213 (S) Macro name calloc
2018 May 03
1
[PATCH] daemon: fix memory allocation and leaks in OCaml stubs
Use the cleanup handlers to free the structs (and list of structs) in case their OCaml->C transformation fails for any reason; use calloc() to not try to use uninitialized memory. In case of lists, avoid allocating the memory for the array if there are no elements, since the returned pointer in that case is either NULL, or a free()-only pointer; also, set the list size only after the array is
2015 Jun 16
1
[PATCH] btrfs: use calloc instead of malloc+memset
Small optimization, and eases the code. --- daemon/btrfs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index f02acb1..7b14bac 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1723,12 +1723,11 @@ do_btrfs_balance_status (const char *path) nlines = count_strings (lines); - ret = malloc(sizeof *ret); + ret = calloc (1,
2009 Nov 03
1
hivex.c: unchecked calloc
Hi Rich, There's an unchecked calloc in hivex.c's hive_open: h->bitmap = calloc (1 + h->size / 32, 1); ... This subsequent deref could cause a segfault: BITMAP_SET (h->bitmap, blkoff);
2001 Jan 05
1
segfault when calling C code
Hi, all. I've got some C code that I've used successfully, and fairly extensively, in R-1.1.1, which is suddenly causing segmentation faults in R-1.2.0. The original code used calloc (just plain calloc) with a free at the end, but I've tried replacing the calloc with R_alloc (based on the Writing R extensions documentation, which I'm not sure I've understood properly), and
2018 Aug 06
1
[PATCH] btrfs_balance_status: delay allocation of 'ret'
Allocate 'ret' as late as possible, so there is no risk that early returns will leak it. --- daemon/btrfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 26757d4fb..5c4be6cf7 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1683,12 +1683,6 @@ do_btrfs_balance_status (const char *path) nlines =