MCPcopy
hub / github.com/questdb/questdb / calloc

Method calloc

core/src/main/java/io/questdb/std/Unsafe.java:125–129  ·  view source on GitHub ↗
(long size, int memoryTag)

Source from the content-addressed store, hash-verified

123 }
124
125 public static long calloc(long size, int memoryTag) {
126 long ptr = malloc(size, memoryTag);
127 Vect.memset(ptr, size, 0);
128 return ptr;
129 }
130
131 public static boolean cas(Object o, long offset, long expected, long value) {
132 return UNSAFE.compareAndSwapLong(o, offset, expected, value);

Callers 14

testReportCrashFilesMethod · 0.95
testSCPFullDownloadMethod · 0.95
testSCPHttp10Method · 0.95
KqueueMethod · 0.95
EpollMethod · 0.95
RingQueueMethod · 0.95
allocateMemoryMethod · 0.95
allocateMemoryArrayMethod · 0.95
JsonUnnestSourceMethod · 0.95
initMethod · 0.95

Calls 2

mallocMethod · 0.95
memsetMethod · 0.95

Tested by 7

testReportCrashFilesMethod · 0.76
testSCPFullDownloadMethod · 0.76
testSCPHttp10Method · 0.76
allocateMemoryMethod · 0.76
allocateMemoryArrayMethod · 0.76