| java.lang.Object | ||
| ↳ | com.facebook.imagepipeline.memory.BasePool<V> | |
| ↳ | com.facebook.imagepipeline.memory.MemoryChunkPool | |
Known Direct Subclasses
|
Manages a pool of memory chunks (MemoryChunk)
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract MemoryChunk |
alloc(int bucketedSize)
Allocates a new 'value' with the given size
| ||||||||||
| void |
free(MemoryChunk value)
Frees the 'value'
| ||||||||||
| int |
getBucketedSize(int requestSize)
Gets the bucketed size (typically something the same or larger than the requested size)
| ||||||||||
| int |
getBucketedSizeForValue(MemoryChunk value)
Gets the bucketed size of the value
| ||||||||||
| int |
getSizeInBytes(int bucketedSize)
Gets the size in bytes for the given bucketed size
| ||||||||||
| boolean |
isReusable(MemoryChunk value)
Determines if the supplied value is 'reusable'.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.facebook.imagepipeline.memory.BasePool
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.common.memory.MemoryTrimmable
| |||||||||||
From interface
com.facebook.common.memory.Pool
| |||||||||||
From interface
com.facebook.common.references.ResourceReleaser
| |||||||||||
Allocates a new 'value' with the given size
| bucketedSize | the logical size to allocate |
|---|
Gets the bucketed size (typically something the same or larger than the requested size)
| requestSize | the logical request size |
|---|
Gets the bucketed size of the value
| value | the value |
|---|
Gets the size in bytes for the given bucketed size
| bucketedSize | the bucketed size |
|---|
Determines if the supplied value is 'reusable'. This is called during release(Object),
and determines if the value can be added to the freelists of the pool (for future reuse), or
must be released right away. Subclasses can override this to provide custom implementations
| value | the value to test for reusability |
|---|