gridgain / gridgain-old

267 stars 85 forks source link

Annotation Based Off Heap Allocators #41

Closed sirinath closed 10 years ago

sirinath commented 10 years ago

Is it possible to provide a easy way to do off heap allocations

E.g

@GGOffHeap
MyObj obj = new MyObj()

Will allocate this on off heap.

sirinath commented 10 years ago

Also you should be able to specify automatic resource management options. E.g.

@GGOffHeap(ARM=ARMOption.BlockExit)
@GGOffHeap(ARM=ARMOption.EndOfBlock)
@GGOffHeap(ARM=ARMOption.MethodReturn)
@GGOffHeap(ARM=ARMOption.ReferenceCounted)
@GGOffHeap(ARM=ARMOption.ResouceManager, resourceManage = ...) // resource manager can manage the off heap allocation. Could be modeled as something like the resource manager in the Project Grizzly
sirinath commented 10 years ago

Any other way to make off heap allocation simple and boilerplate free is welcome.

dsetrakyan commented 10 years ago

OffHeap allocation in GridGain is as easy as specifying GridCacheMemoryMode.OFFHEAP_TIERED configuration parameter. Objects that are not used on-heap get automatically LRU'ed to off-heap.

sirinath commented 10 years ago

OK. Great.