MCPcopy Index your code
hub / github.com/questdb/questdb / mremap0

Method mremap0

core/src/main/java/io/questdb/std/MmapCache.java:310–321  ·  view source on GitHub ↗
(int fd, long address, long previousSize, long newSize, long offset, int flags, int oldMemoryTag, int memoryTag)

Source from the content-addressed store, hash-verified

308 }
309
310 private static long mremap0(int fd, long address, long previousSize, long newSize, long offset, int flags, int oldMemoryTag, int memoryTag) {
311 address = Files.mremap0(fd, address, previousSize, newSize, offset, flags);
312 if (address != -1) {
313 if (oldMemoryTag == memoryTag) {
314 Unsafe.recordMemAlloc(newSize - previousSize, memoryTag);
315 } else {
316 Unsafe.recordMemAlloc(newSize, memoryTag);
317 Unsafe.recordMemAlloc(-previousSize, oldMemoryTag);
318 }
319 }
320 return address;
321 }
322
323 private static void munmapTaskConsumer(MunmapTask task) {
324 int result = Files.munmap0(task.address, task.size);

Callers 1

mremapMethod · 0.95

Calls 2

mremap0Method · 0.95
recordMemAllocMethod · 0.95

Tested by

no test coverage detected