Patent ID: 8707006
Filing Date: 2014-04-22
Classification: G06F

Abstract:
1. A method for managing a memory, comprising: obtaining a first size class; obtaining a number of indices and a cache line size of a cache memory; computing a cache page size by multiplying the number of indices by the cache line size; calculating a greatest common denominator (GCD) of the cache page size and the first size class; incrementing, in response to the GCD of the cache page size and the first size class exceeding the cache line size, the first size class to generate an updated first size class; calculating a GCD of the cache page size and the updated first size class; creating, in response to the GCD of the cache page size and the updated first size class being less than the cache line size, a first superblock in the memory comprising a first plurality of blocks of the updated first size class; creating a second superblock in the memory; receiving a memory allocation request (MAR) for an object having a size; mapping, in response to the MAR, the size of the object to the updated first size class; identifying, in response to mapping the size of the object to the updated first size class, a free block of the first plurality of blocks in the first superblock; and returning, in the response to the memory allocation request, an address of the free block.