more chunk pool codes

This commit is contained in:
minjaesong
2024-10-08 00:15:17 +09:00
parent 07b4f3bff1
commit b4523b8492
4 changed files with 56 additions and 10 deletions

View File

@@ -50,6 +50,10 @@ internal object UnsafeHelper {
unsafe.copyMemory(srcObj, getArrayOffset(srcObj) + startIndex, null, destPos, len.toLong())
fun memcpyFromArrToPtr(srcObj: Any, startIndex: Int, destPos: Long, len: Long) =
unsafe.copyMemory(srcObj, getArrayOffset(srcObj) + startIndex, null, destPos, len)
fun memcpyFromPtrToArr(srcPos: Long, destObj: Any, startIndex: Int, len: Int) =
unsafe.copyMemory(null, srcPos, destObj, getArrayOffset(destObj) + startIndex, len.toLong())
fun memcpyFromPtrToArr(srcPos: Long, destObj: Any, startIndex: Int, len: Long) =
unsafe.copyMemory(null, srcPos, destObj, getArrayOffset(destObj) + startIndex, len)
/**
* The array object in JVM is stored in this memory map: