MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/test_aligned_alloc.c:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <errno.h>
12
13int main() {
14 for (int times = 0; times < 16; ++times) {
15 for (int alignment = sizeof(void*); alignment <= 64; alignment *= 2) {
16 assert((uintptr_t)aligned_alloc(alignment, 64) % alignment == 0);
17 }
18 }
19 void *ptr;
20 ptr = aligned_alloc(3, 64);
21 assert(ptr == NULL);
22 assert(posix_memalign(&ptr, 3, 64) == EINVAL);
23 assert(ptr == NULL);
24 return 0;
25}

Callers

nothing calls this directly

Calls 3

posix_memalignFunction · 0.85
assertFunction · 0.50
aligned_allocFunction · 0.50

Tested by

no test coverage detected