HomeSort by: relevance | last modified time | path
    Searched refs:alignment (Results 1 - 25 of 300) sorted by relevancy

1 2 3 4 5 6 7 8 91011>>

  /src/lib/libc/stdlib/
aligned_alloc.c 42 aligned_alloc(size_t alignment, size_t size)
48 * Check that alignment is a power of 2.
50 if (alignment == 0 || ((alignment - 1) & alignment) != 0) {
56 * Adjust alignment to satisfy posix_memalign,
59 while (alignment < sizeof(void *)) {
60 alignment <<= 1;
63 err = posix_memalign(&memptr, alignment, size);
  /src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/
sanitizer_allocator_checks.h 41 // Checks aligned_alloc() parameters, verifies that the alignment is a power of
42 // two and that the size is a multiple of alignment for POSIX implementation,
44 // of alignment.
45 INLINE bool CheckAlignedAllocAlignmentAndSize(uptr alignment, uptr size) {
47 return alignment != 0 && IsPowerOfTwo(alignment) &&
48 (size & (alignment - 1)) == 0;
50 return alignment != 0 && size % alignment == 0;
54 // Checks posix_memalign() parameters, verifies that alignment is a power of tw
    [all...]
sanitizer_allocator_report.h 26 void NORETURN ReportInvalidAllocationAlignment(uptr alignment,
28 void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment,
30 void NORETURN ReportInvalidPosixMemalignAlignment(uptr alignment,
sanitizer_allocator_report.cc 65 void NORETURN ReportInvalidAllocationAlignment(uptr alignment,
68 ScopedAllocatorErrorReport report("invalid-allocation-alignment", stack);
69 Report("ERROR: %s: invalid allocation alignment: %zd, alignment must be a "
70 "power of two\n", SanitizerToolName, alignment);
75 void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment,
78 ScopedAllocatorErrorReport report("invalid-aligned-alloc-alignment", stack);
80 Report("ERROR: %s: invalid alignment requested in "
81 "aligned_alloc: %zd, alignment must be a power of two and the "
82 "requested size 0x%zx must be a multiple of alignment\n"
    [all...]
sanitizer_allocator.cc 33 extern "C" void *__libc_memalign(uptr alignment, uptr size);
41 static void *__libc_memalign(uptr alignment, uptr size) {
43 uptr error = posix_memalign(&p, alignment, size);
53 uptr alignment) {
56 if (alignment == 0)
59 return __libc_memalign(alignment, size);
66 DCHECK_EQ(alignment, 0);
110 uptr alignment) {
111 if (alignment == 0) alignment = 8
122 uptr alignment = 8; local in function:__sanitizer::RawInternalRealloc
    [all...]
sanitizer_allocator_combined.h 48 void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) {
52 if (size + alignment < size) {
54 "0x%zx bytes with 0x%zx alignment requested\n",
55 SanitizerToolName, size, alignment);
59 // If alignment requirements are to be fulfilled by the frontend allocator
60 // rather than by the primary or secondary, passing an alignment lower than
62 // alignment check.
63 if (alignment > 8)
64 size = RoundUpTo(size, alignment);
69 // alignment without such requirement, and allocating 'size' would us
    [all...]
  /src/sys/external/bsd/compiler_rt/dist/include/sanitizer/
hwasan_interface.h 65 int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size);
66 void * __sanitizer_memalign(size_t alignment, size_t size);
67 void * __sanitizer_aligned_alloc(size_t alignment, size_t size);
68 void * __sanitizer___libc_memalign(size_t alignment, size_t size);
  /src/sys/external/bsd/drm/dist/bsd-core/
drm_mm.h 62 unsigned alignment,
66 unsigned alignment)
68 return drm_mm_get_block_generic(parent, size, alignment, 0);
72 unsigned alignment)
74 return drm_mm_get_block_generic(parent, size, alignment, 1);
79 unsigned alignment,
drm_sman.h 60 /* Allocate a memory block with given size and alignment.
64 unsigned alignment);
144 unsigned alignment,
  /src/lib/librumpuser/
rumpuser_mem.c 47 rumpuser_malloc(size_t howmuch, int alignment, void **memp)
52 if (alignment == 0)
53 alignment = sizeof(void *);
55 rv = posix_memalign(&mem, (size_t)alignment, howmuch);
58 printf("rumpuser_malloc: invalid alignment %d\n",
59 alignment);
87 "alignment not supported by hypervisor\n");
  /src/sys/external/bsd/compiler_rt/dist/lib/tsan/rtl/
tsan_malloc_mac.cc 28 #define COMMON_MALLOC_MEMALIGN(alignment, size) \
30 user_memalign(cur_thread(), StackTrace::GetCurrentPc(), alignment, size)
43 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \
45 void *p = InternalAlloc(size, nullptr, alignment); \
50 SCOPED_INTERCEPTOR_RAW(posix_memalign, memptr, alignment, size); \
51 int res = user_posix_memalign(thr, pc, memptr, alignment, size);
  /src/sys/external/bsd/drm2/dist/drm/i915/gem/
i915_gem_stolen.h 19 unsigned alignment);
22 unsigned alignment, u64 start,
  /src/sbin/gpt/
resize.c 56 "[-i index | -b blocknr] [-a alignment] [-s size] [-q]",
69 resize(gpt_t gpt, u_int entry, off_t alignment, off_t sectors,
89 alignsecs = alignment / gpt->secsz;
102 if (alignment == 0 ||
103 (alignment > 0 && sectors % alignsecs == 0)) {
146 off_t alignment = 0, sectors, start = 0, size = 0; local in function:cmd_resize
156 else if (gpt_add_ais(gpt, &alignment, &entry, &size, ch) == -1)
175 if ((sectors = gpt_check_ais(gpt, alignment, entry, size)) == -1)
178 return resize(gpt, entry, alignment, sectors, size, quiet);
map.c 203 map_alloc(gpt_t gpt, off_t start, off_t size, off_t alignment)
208 if (alignment > 0) {
209 if ((start % alignment) != 0)
210 start = (start + alignment) / alignment * alignment;
211 if ((size % alignment) != 0)
212 size = (size + alignment) / alignment * alignment;
    [all...]
  /src/sys/external/bsd/compiler_rt/dist/lib/asan/
asan_malloc_local.h 28 void* MemalignFromLocalPool(uptr alignment, uptr size);
asan_malloc_mac.cc 29 #define COMMON_MALLOC_MEMALIGN(alignment, size) \
31 void *p = asan_memalign(alignment, size, &stack, FROM_MALLOC)
41 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \
43 int res = asan_posix_memalign(memptr, alignment, size, &stack);
asan_malloc_linux.cc 65 static int PosixMemalignFromLocalPool(void **memptr, uptr alignment,
67 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment)))
70 CHECK(alignment >= kWordSize);
73 uptr aligned_addr = RoundUpTo(addr, alignment);
87 void* MemalignFromLocalPool(uptr alignment, uptr size) {
89 alignment = Max(alignment, kWordSize);
90 PosixMemalignFromLocalPool(&ptr, alignment, size);
216 INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) {
218 return PosixMemalignFromLocalPool(memptr, alignment, size)
    [all...]
asan_premap_shadow.cc 37 uptr alignment = granularity * 8; local in function:__asan::PremapShadow
40 uptr map_size = shadow_size + left_padding + alignment;
45 uptr shadow_start = RoundUpTo(map_start + left_padding, alignment);
  /src/sys/external/bsd/compiler_rt/dist/lib/lsan/
lsan_malloc_mac.cc 28 #define COMMON_MALLOC_MEMALIGN(alignment, size) \
30 void *p = lsan_memalign(alignment, size, stack)
40 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \
42 int res = lsan_posix_memalign(memptr, alignment, size, stack)
lsan_allocator.cc 79 void *Allocate(const StackTrace &stack, uptr size, uptr alignment,
85 void *p = allocator.Allocate(GetAllocatorCache(), size, alignment);
119 uptr alignment) {
125 p = allocator.Reallocate(GetAllocatorCache(), p, new_size, alignment);
141 int lsan_posix_memalign(void **memptr, uptr alignment, uptr size,
143 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) {
146 ReportInvalidPosixMemalignAlignment(alignment, &stack);
148 void *ptr = Allocate(stack, size, alignment, kAlwaysClearMemory);
152 CHECK(IsAligned((uptr)ptr, alignment));
157 void *lsan_aligned_alloc(uptr alignment, uptr size, const StackTrace &stack)
    [all...]
  /src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/
exynos-mfc-reserved-memory.dtsi 18 alignment = <0x100000>;
25 alignment = <0x100000>;
  /src/sys/external/bsd/drm2/dist/drm/i915/
i915_gem_gtt.c 190 * @alignment: required alignment of starting offset, may be 0 but
201 * is can insert the node. The hole address is aligned to @alignment and
220 u64 size, u64 alignment, unsigned long color,
231 GEM_BUG_ON(alignment && !is_power_of_2(alignment));
232 GEM_BUG_ON(alignment && !IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT));
242 if (unlikely(round_up(start, alignment) > round_down(end - size, alignment)))
    [all...]
  /src/sys/external/bsd/drm2/dist/drm/qxl/
qxl_gem.c 51 int alignment, int initial_domain,
61 if (alignment < PAGE_SIZE)
62 alignment = PAGE_SIZE;
68 size, initial_domain, alignment, r);
  /src/lib/libbsdmalloc/
malloc.c 75 * byte is the size index. The remaining bytes are for alignment.
506 * already aligned by malloc on multiples of n. Larger alignment is
527 aligned_alloc(size_t alignment, size_t size)
531 if (alignment == 0 ||
532 (alignment & (alignment - 1)) != 0 ||
533 alignment > cachedpagesize()) {
537 p = malloc(size < alignment ? alignment : size);
539 ASSERT((uintptr_t)p % alignment == 0)
    [all...]
  /src/sys/arch/hpcmips/dev/
com_hpcio.c 215 int alignment; local in function:com_hpcio_cndb_attach
218 if (!com_hpcio_common_probe(iot, iobase, &alignment)) {
222 if (alignment == COM_HPCIO_HALFWORD_ALIGNMENT) {
242 com_hpcio_common_probe(bus_space_tag_t iot, int iobase, int *alignment)
251 *alignment = COM_HPCIO_BYTE_ALIGNMENT;
263 *alignment = COM_HPCIO_HALFWORD_ALIGNMENT;
278 int addr, alignment; local in function:com_hpcio_probe
291 return com_hpcio_common_probe(iot, addr, &alignment);
303 int addr, port, mode, alignment, *loc; local in function:com_hpcio_attach
317 com_hpcio_common_probe(haa->haa_iot, addr, &alignment);
    [all...]

Completed in 30 milliseconds

1 2 3 4 5 6 7 8 91011>>