incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Perroud (Updated) (JIRA)" <>
Subject [jira] [Updated] (DIRECTMEMORY-53) MemoryMamagerService buffers allocation policy
Date Tue, 03 Jan 2012 12:40:39 GMT


Benoit Perroud updated DIRECTMEMORY-53:


PoC of allocation policy. 
- Interface allocationPolicy
- Default Round Robin implementation : an internal counter is incremented at every request,
resulting in returning the next buffer at every call
- A MemoryManagerService implementation with allocation policy usage : loop calling allocationPolicy.activeBuffer,
trying to store the data, repeating till activeBuffer is null
> MemoryMamagerService buffers allocation policy
> ----------------------------------------------
>                 Key: DIRECTMEMORY-53
>                 URL:
>             Project: Apache DirectMemory
>          Issue Type: Improvement
>            Reporter: Benoit Perroud
>            Priority: Minor
>         Attachments:,,
> MemoryMamagerService with multiple buffers has a really simple, even buggy allocation
policy : once a allocation fail (return null), we try the next buffer. If the allocation fails
a second time, we return a failure (a null Pointer) to the caller. 
> If all the previous buffer were full at one point, we stick to the last buffer, without
any chance to try to allocate into a previous different buffer (which could have again free
space due to expiration or pointer freeing).
> My idea here is to first correct this behavior, but then enhance the fonctionality by
providing configurable buffer allocation policy. For example : 
> - round robin allocation, with a certain amount of retries (this would also relax some
concurrency contention)
> - allocate into the buffer with the more free space
> - allocate into the less fragmented buffer
> - random
> - ...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message