Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alaisi/nalloc
/ functions
Functions
148 in github.com/alaisi/nalloc
⨍
Functions
148
◇
Types & classes
31
↓ 34 callers
Method
get
Accessor for array at index. To prevent JVM heap allocations the returned struct is always the same object for an array instance and only the struct p
src/main/java/com/github/nalloc/Array.java:31
↓ 29 callers
Method
deref
@return Struct referenced by this pointer.
src/main/java/com/github/nalloc/Pointer.java:27
↓ 28 callers
Method
val
()
src/test/java/com/github/nalloc/impl/Val.java:28
↓ 17 callers
Method
address
@return Memory address pointed to.
src/main/java/com/github/nalloc/Pointer.java:32
↓ 14 callers
Method
create
(Class<? extends NativeStruct> structClass)
src/main/java/com/github/nalloc/impl/NativeStruct.java:31
↓ 14 callers
Method
name
()
src/test/java/com/github/nalloc/impl/UnsafeNativeHeapAllocatorTest.java:75
↓ 9 callers
Method
c
()
src/test/java/com/github/nalloc/impl/StructTest.java:134
↓ 9 callers
Method
clone
Returns a shallow clone of an array. Cloning is a cheap operation, only the pointer is cloned and not the array content. @return Clone of this array
src/main/java/com/github/nalloc/Array.java:54
↓ 9 callers
Method
struct
(final Class<T> structType)
src/test/java/com/github/nalloc/impl/StructTest.java:118
↓ 8 callers
Method
calloc
The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is
src/main/java/com/github/nalloc/NativeHeapAllocator.java:52
↓ 7 callers
Method
getSize
@return Length of struct in bytes
src/main/java/com/github/nalloc/impl/NativeStruct.java:44
↓ 7 callers
Method
malloc
The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. See <a href="http://pubs.ope
src/main/java/com/github/nalloc/NativeHeapAllocator.java:38
↓ 7 callers
Method
mmap
mmap() creates a new mapping in the virtual address space of the calling process. See <a href="http://pubs.opengroup.org/onlinepubs/009695399/functio
src/main/java/com/github/nalloc/MmapAllocator.java:44
↓ 7 callers
Method
size
Returns the amount of structs in this memory region. @return Length of array
src/main/java/com/github/nalloc/Array.java:46
↓ 6 callers
Method
id
()
src/test/java/com/github/nalloc/impl/DirectBufferMmapAllocatorTest.java:114
↓ 6 callers
Method
string
()
src/test/java/com/github/nalloc/impl/StructTest.java:156
↓ 5 callers
Method
compatible
()
src/test/java/com/github/nalloc/impl/StructTest.java:184
↓ 5 callers
Method
generate
Generates a class implementing a struct interface. @param definitionClass Interface class annotated with @Struct @return Implementing class
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:56
↓ 5 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/StructTest.java:158
↓ 3 callers
Method
array
()
src/test/java/com/github/nalloc/impl/NativeStructTest.java:56
↓ 3 callers
Method
array
()
src/test/java/com/github/nalloc/impl/StructTest.java:191
↓ 3 callers
Method
getByte
(final long address)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:45
↓ 3 callers
Method
nested
()
src/test/java/com/github/nalloc/impl/NativeStructTest.java:55
↓ 2 callers
Method
b
()
src/test/java/com/github/nalloc/impl/StructTest.java:136
↓ 2 callers
Method
barray
()
src/test/java/com/github/nalloc/impl/StructTest.java:148
↓ 2 callers
Method
c
()
src/test/java/com/github/nalloc/impl/StructTest.java:170
↓ 2 callers
Method
carray
()
src/test/java/com/github/nalloc/impl/StructTest.java:150
↓ 2 callers
Method
carray
()
src/test/java/com/github/nalloc/impl/StructTest.java:172
↓ 2 callers
Method
file
()
src/test/java/com/github/nalloc/impl/DirectBufferMmapAllocatorTest.java:107
↓ 2 callers
Method
get
(final long index)
src/main/java/com/github/nalloc/impl/HeapArray.java:47
↓ 2 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/DirectBufferMmapAllocatorTest.java:116
↓ 2 callers
Method
iarray
()
src/test/java/com/github/nalloc/impl/StructTest.java:152
↓ 2 callers
Method
inumber
()
src/test/java/com/github/nalloc/impl/StructTest.java:132
↓ 2 callers
Method
l
()
src/test/java/com/github/nalloc/impl/StructTest.java:168
↓ 2 callers
Method
larray
()
src/test/java/com/github/nalloc/impl/StructTest.java:154
↓ 2 callers
Method
lnumber
()
src/test/java/com/github/nalloc/impl/StructTest.java:130
↓ 2 callers
Method
string
()
src/test/java/com/github/nalloc/impl/StructTest.java:174
↓ 2 callers
Method
string2
()
src/test/java/com/github/nalloc/impl/StructTest.java:176
↓ 2 callers
Method
toBytes
Casts the {@link Array} of structs to {@link ByteBuffer}. Calling this method never allocates from JVM heap. @param structs Mmapped array @return Ar
src/main/java/com/github/nalloc/MmapAllocator.java:83
↓ 2 callers
Method
toString
()
src/main/java/com/github/nalloc/impl/HeapArray.java:85
↓ 1 callers
Method
byteLength
(final Struct struct, final Field field)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:373
↓ 1 callers
Method
clear
Sets memory to 0 at index. @param index Array index to clear @return Struct addressed to index
src/main/java/com/github/nalloc/Array.java:39
↓ 1 callers
Method
close
AutoCloseable support, calls free().
src/main/java/com/github/nalloc/Pointer.java:57
↓ 1 callers
Method
free
()
src/main/java/com/github/nalloc/impl/HeapPointer.java:51
↓ 1 callers
Method
free
()
src/main/java/com/github/nalloc/impl/HeapArray.java:80
↓ 1 callers
Method
generateFieldAccessors
(final CtClass generated, final Struct struct, final Field field, final long offset, final CtClass definiti
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:123
↓ 1 callers
Method
generateGetSize
(final CtClass generated, final Struct struct, final long finalOffset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:111
↓ 1 callers
Method
generateSimpleFieldAccessor
(final CtClass generated, final Struct struct, final Field field, final long offset, final CtClass definiti
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:198
↓ 1 callers
Method
generateStructAccessor
(final CtClass generated, final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:146
↓ 1 callers
Method
generateStructArrayAccessor
(final CtClass generated, final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:171
↓ 1 callers
Method
getLong
(final long address)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:36
↓ 1 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/StructTest.java:138
↓ 1 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/StructTest.java:178
↓ 1 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/StructTest.java:185
↓ 1 callers
Method
getSize
()
src/test/java/com/github/nalloc/impl/StructTest.java:192
↓ 1 callers
Method
implementGet
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:215
↓ 1 callers
Method
implementGetByte
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:234
↓ 1 callers
Method
implementGetChar
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:241
↓ 1 callers
Method
implementGetInt
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:254
↓ 1 callers
Method
implementGetLong
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:261
↓ 1 callers
Method
implementGetString
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:268
↓ 1 callers
Method
implementSet
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:275
↓ 1 callers
Method
implementSetByte
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:294
↓ 1 callers
Method
implementSetChar
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:301
↓ 1 callers
Method
implementSetInt
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:314
↓ 1 callers
Method
implementSetLong
(final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:321
↓ 1 callers
Method
implementSetString
(final Struct struct, final Field field, final long offset)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:328
↓ 1 callers
Method
realloc
The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents will be unchanged in the range from the star
src/main/java/com/github/nalloc/NativeHeapAllocator.java:68
↓ 1 callers
Method
typeByteLength
(final Struct struct, final Field field)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:355
↓ 1 callers
Method
typeToClassName
(final Field field, final CtClass definition)
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:335
Method
DirectBufferMmapAllocator
(final Class<?>... structTypes)
src/main/java/com/github/nalloc/impl/DirectBufferMmapAllocator.java:42
Method
HeapArray
@param address Pointer address @param size Size of array @param struct Struct instance
src/main/java/com/github/nalloc/impl/HeapArray.java:40
Method
HeapPointer
(final NativeStruct struct)
src/main/java/com/github/nalloc/impl/HeapPointer.java:31
Method
MmapArray
(final ByteBuffer buffer, final long size, final NativeStruct struct)
src/main/java/com/github/nalloc/impl/MmapArray.java:33
Method
StructClassGenerator
Creates a new generator. @param definitions Struct interfaces
src/main/java/com/github/nalloc/impl/StructClassGenerator.java:44
Method
UnsafeNativeHeapAllocator
(final Class<?>... structTypes)
src/main/java/com/github/nalloc/impl/UnsafeNativeHeapAllocator.java:36
Method
address
()
src/main/java/com/github/nalloc/impl/HeapPointer.java:41
Method
address
()
src/main/java/com/github/nalloc/impl/HeapArray.java:70
Method
calloc
(final long nmemb, final Class<T> structType)
src/main/java/com/github/nalloc/impl/UnsafeNativeHeapAllocator.java:50
Method
cleanup
()
src/test/java/com/github/nalloc/impl/DirectBufferMmapAllocatorTest.java:100
Method
clear
(final long index)
src/main/java/com/github/nalloc/impl/HeapArray.java:54
Method
clone
Returns a shallow clone of a pointer. Cloning is a cheap operation, only the pointer is cloned and not the data pointed to. @return Clone of this poi
src/main/java/com/github/nalloc/Pointer.java:52
Method
clone
()
src/main/java/com/github/nalloc/impl/MmapArray.java:43
Method
clone
()
src/main/java/com/github/nalloc/impl/HeapPointer.java:61
Method
clone
()
src/main/java/com/github/nalloc/impl/HeapArray.java:90
Method
clone
Creates a deep copy of the instance.
src/main/java/com/github/nalloc/impl/NativeStruct.java:63
Method
close
()
src/main/java/com/github/nalloc/impl/HeapPointer.java:66
Method
close
()
src/main/java/com/github/nalloc/impl/HeapArray.java:95
Method
create
Creates a new {@link MmapAllocator} that can allocate structs listed in structTypes. This is an expensive operation and callers should store the retur
src/main/java/com/github/nalloc/MmapAllocator.java:93
Method
create
Creates a new {@link NativeHeapAllocator} that can allocate structs listed in structTypes. This is an expensive operation and callers should store the
src/main/java/com/github/nalloc/NativeHeapAllocator.java:78
Method
deref
()
src/main/java/com/github/nalloc/impl/HeapPointer.java:35
Method
deref
()
src/main/java/com/github/nalloc/impl/HeapArray.java:65
Method
free
Frees memory that is pointed to by this pointer.
src/main/java/com/github/nalloc/Pointer.java:44
Method
free
()
src/main/java/com/github/nalloc/impl/MmapArray.java:38
Method
getAnsiCChar
(final long address)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:106
Method
getAnsiCChars
(final long address, final long len)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:109
Method
getAnsiCString
(final long address, final long len)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:116
Method
getBytes
(final long address, final long len)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:49
Method
getChar
(final long address)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:42
Method
getChars
(final long address, final long len)
src/main/java/com/github/nalloc/impl/PointerArithmetics.java:54
next →
1–100 of 148, ranked by callers