search for: posix_memalign

Displaying 20 results from an estimated 103 matches for "posix_memalign".

2010 Apr 09
0
implicit declaration of function `posix_memalign''
...level/xc -I ./ -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -Werror -Wno-unused -g -D__USE_XOPEN2K -Wp,-MD,.xenpaging.o.d -c -o xenpaging.o xenpaging.c xenpaging.c: In function `init_page'': xenpaging.c:51: warning: implicit declaration of function `posix_memalign'' make[3]: *** [xenpaging.o] Error 1 make[3]: Leaving directory `/usr/src/redhat/BUILD/xen-4.0.0/tools/xenpaging'' make[2]: *** [subdir-install-xenpaging] Error 2 make[2]: Leaving directory `/usr/src/redhat/BUILD/xen-4.0.0/tools'' make[1]: *** [subdirs-install] Error 2 make[...
2009 Jan 12
2
[LLVMdev] malloc vs malloc
...o we want to keep the free instruction? > > No, there's no reason to. There still are reasons to have it; just grep around for FreeInst. Function attributes are not yet sufficient to replace all of those yet. And if the ailgnment attribute on MallocInst were implemented, perhaps via posix_memalign or other target-specific mechanisms, then MallocInst would also have a reason to be kept. Dan
2016 Oct 03
3
Default alignment for 'malloc'
...rs. I don't > think there is a way to annotate calls malloc to have some specific > alignment from the backend, that has effect on passes before the > backend. Note that this only applies to base types. Vector types certainly can require larger alignment in practice and that's why posix_memalign exists. Joerg
2020 Apr 06
0
[PATCH v4 09/12] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 06
0
[PATCH v4 09/12] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 06
0
[PATCH v5 09/12] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 06
0
[PATCH v6 09/12] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 07
0
[PATCH v7 13/19] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 07
0
[PATCH v8 13/19] tools/virtio: switch to virtio_legacy_init/size
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2009 Jan 12
0
[LLVMdev] malloc vs malloc
...t;> >> No, there's no reason to. > > > There still are reasons to have it; just grep around for FreeInst. > Function > attributes are not yet sufficient to replace all of those yet. > > And if the ailgnment attribute on MallocInst were implemented, perhaps > via posix_memalign or other target-specific mechanisms, then > MallocInst > would also have a reason to be kept. isa<FreeInst>(X) can be replaced with: bool isFree(Instruction *X) { if (CallInst *CI = dyn_cast<CallInst>(X)) if (Function *F = CI->getCalledFunction()) if (F->i...
2013 Apr 19
8
[PATCH 0 of 8] blktap3/libvhd: Introduce VHD library.
This patch series introduces the VHD library. It is based on the blktap2 one, with changes coming from the blktap2.5 one. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2011 Jun 09
0
Coverity: possible false positive in debug_qtrace
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/debug.c;h=cd3e8a5f0294a910782b38552d2b0757869f862c;hb=HEAD#l430 Coverity complains about the error path from posix_memalign (lines 477-482) saying that 'buf' will be leaked. However my reading of the posix_memalign man page is that if the return value from posix_memalign != 0 then 'buf' would not have been allocated. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjon...
2006 Dec 19
2
Compiler warnings using gcc-4.1
Hi Josh et al, I'm compiling on an Ubuntu Edgy x86 machine. Edgy comes standard with gcc-4.1 and I'm getting a number of warnings: memory.c: In function 'FLAC__memory_alloc_aligned': memory.c:52: warning: cast from pointer to integer of different size memory.c:52: warning: cast to pointer from integer of different size metadata_iterators.c: In function
2006 May 10
1
Floating Point Exception
I have a Fedora Core server running: Fedora Core release 4 (Stentz) kernel version: 2.6.15-1.1833_FC4smp ( I have also tried kernel version: 2.6.16-1.2108_FC4smp) I compiled the ocfs2 and ocfs2-tools using the following steps: # MODULES: tar zxvpf ocfs2-1.2.1.tar.gz cd ocfs2-1.2.1 ./configure make make install # TOOLS: tar zxf ocfs2-tools-1.2.1.tar.gz cd ocfs2-tools-1.2.1 ./configure
2008 Aug 12
3
aligned memory allocation in C
Hi, I'm currently R porting SF Mersenne Twister algorithm of Matsumoto and Saito. To get the full power of their code, I want to use their fonction fill_array32 which need aligned memory. That is to say I need to use the C function memalign on windows, posix_memalign on linux and classic malloc on Mac OS. In 'writing R extenstion', they recommand to use R_alloc function to allocate memory in C. Does R_alloc return a pointer to aligned memory? if not how can I do this? probably no, because R crashes when I succesively R_alloc and fill_array32 (cf...
2008 Aug 12
3
aligned memory allocation in C
Hi, I'm currently R porting SF Mersenne Twister algorithm of Matsumoto and Saito. To get the full power of their code, I want to use their fonction fill_array32 which need aligned memory. That is to say I need to use the C function memalign on windows, posix_memalign on linux and classic malloc on Mac OS. In 'writing R extenstion', they recommand to use R_alloc function to allocate memory in C. Does R_alloc return a pointer to aligned memory? if not how can I do this? probably no, because R crashes when I succesively R_alloc and fill_array32 (cf...
2009 Jan 13
2
[LLVMdev] malloc vs malloc
...re's no reason to. >> >> There still are reasons to have it; just grep around for FreeInst. >> Function >> attributes are not yet sufficient to replace all of those yet. >> >> And if the ailgnment attribute on MallocInst were implemented, perhaps >> via posix_memalign or other target-specific mechanisms, then >> MallocInst >> would also have a reason to be kept. > > isa<FreeInst>(X) can be replaced with: > > bool isFree(Instruction *X) { > if (CallInst *CI = dyn_cast<CallInst>(X)) > if (Function *F = CI->g...
2020 Apr 06
1
[PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...diff --git a/tools/virtio/ringtest/virtio_ring_0_9.c b/tools/virtio/ringtest/virtio_ring_0_9.c index 13a035a390e9..e2ab6ac53966 100644 --- a/tools/virtio/ringtest/virtio_ring_0_9.c +++ b/tools/virtio/ringtest/virtio_ring_0_9.c @@ -67,13 +67,13 @@ void alloc_ring(void) int i; void *p; - ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); + ret = posix_memalign(&p, 0x1000, vring_legacy_size(ring_size, 0x1000)); if (ret) { perror("Unable to allocate ring buffer.\n"); exit(3); } - memset(p, 0, vring_size(ring_size, 0x1000)); - vring_init(&ring, ring_size, p, 0...