[
https://issues.apache.org/jira/browse/DIRECTMEMORY-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raffaele P. Guidi resolved DIRECTMEMORY-99.
-------------------------------------------
Resolution: Fixed
fixed calling free AND adding the pointer to the map again
> CacheServiceImpl.store does not add back the pointer to the map in case it
> already existed
> -------------------------------------------------------------------------------------------
>
> Key: DIRECTMEMORY-99
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-99
> Project: Apache DirectMemory
> Issue Type: Bug
> Reporter: Raffaele P. Guidi
> Assignee: Raffaele P. Guidi
>
> This code illustrates my problem:
> CacheService<String, Long> cache = new DirectMemory<String, Long>()
> .setNumberOfBuffers(10)
> .setSize(1000)
> .setInitialCapacity(100000)
> .setConcurrencyLevel(4)
> .newCacheService();
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 3 : " + cache.put("a", 3L));
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 5 : " + cache.put("a", 5L));
> System.out.println("a : " + cache.retrieve("a"));
> Running it gives this output:
> a : null
> a -> 3 : PointerImpl[0, 0] not free
> a : 3
> a -> 5 : PointerImpl[0, 0] not free
> a : null
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira