All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vproxy.pni.impl.SegmentAllocatorAllocator Maven / Gradle / Ivy

The newest version!
package io.vproxy.pni.impl;

import io.vproxy.pni.Allocator;

import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;

public class SegmentAllocatorAllocator extends AbstractAllocator implements Allocator {
    private final SegmentAllocator allocator;

    public SegmentAllocatorAllocator(SegmentAllocator allocator) {
        this.allocator = allocator;
    }

    @Override
    public MemorySegment allocate(long size) {
        return allocator.allocate(size);
    }

    @Override
    public MemorySegment allocate(long size, int alignment) {
        return allocator.allocate(size, alignment);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy