[ 
https://issues.apache.org/jira/browse/GEODE-6696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16834041#comment-16834041
 ] 

Darrel Schneider commented on GEODE-6696:
-----------------------------------------

One way to determine if off-heap is being used is to call 
InternalDistributedSystem.getOffHeapStore(). If it returns null then off-heap 
is not being used.
Many EntryEventImpl constructors are given a Region could could be used to get 
the InternalDistributedSystem. You basically ask the region for its cache and 
the cache for its InternalDistributedSystem. But one EntryEventImpl constructor 
just takes an Object. It is only called in one place and it has the IDS so it 
could be changed to just pass it in to the constructor.
An alternative would be to access the static singleton on MemoryAllocatorImpl 
but I would avoid doing it this way if possible.

> Only create EntryEvenImpl.offHeapLock if off heap is in use.
> ------------------------------------------------------------
>
>                 Key: GEODE-6696
>                 URL: https://issues.apache.org/jira/browse/GEODE-6696
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Jacob S. Barrett
>            Priority: Minor
>              Labels: performance
>
> Reduce allocation of unnecessary lock object if not using off heap storage.
> {{  private final Object offHeapLock = new Object();}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to