IP Library Granted Patent US 9,292,448
Granted Patent B2
US 9,292,448 · App. 14/032,170 · Granted Mar 22, 2016

Dynamic sizing of memory caches

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,292,448
App. No.
14/032,170
Granted
Mar 22, 2016
Kind
B2
Abstract

Disclosed are cache management apparatus and methods. A mobile device can include a global cache manager (GCM), a processor, and a storage medium. The GCM can manage a cache for an application of the mobile device. The storage medium can store instructions that, upon the processor's execution, cause the mobile device to perform functions. The functions can include: receiving an indication of a triggering event related to memory allocated for the application; the GCM responsively determining an amount of memory allocated to the application; the GCM determining whether a memory limit for the application is within a threshold amount of being exceeded by the amount of memory allocated to the application; and responsive to determining that the memory limit for the application is within the threshold amount of being exceeded, instructing the application to cease utilization of a portion of memory allocated to the cache.

Claims (48)

1. A mobile device, comprising:

a global cache manager, wherein the global cache manager is configured to manage a cache for one or more applications of the mobile device, wherein the mobile device comprises a non-application space and an application space, wherein the non-application space is distinct from the application space, wherein the non-application space is configured to store an operating system of the mobile device, and wherein the global cache manager and the one or more applications are configured to execute while resident in the application space of the mobile device;

a processor; and

a computer-readable storage medium having instructions stored thereon that, upon execution of the instructions by the processor, cause the mobile device to perform functions comprising:

receiving, at the global cache manager, an indication of a triggering event related to memory allocated for an application of the one or more applications, wherein the global cache manager is distinct from the application;

responsively determining, using the global cache manager, an amount of memory currently allocated to the application;

determining, using the global cache manager, whether a memory limit for the application is within a threshold amount of being exceeded by the amount of memory currently allocated to the application; and

responsive to determining that the memory limit for the application is within the threshold amount of being exceeded, the global cache manager instructing the application to cease utilization of a portion of memory currently allocated to the cache.

2. The mobile device of claim 1 , further comprising a memory manager, wherein the memory manager is separate from the global cache manager, wherein the memory manager is configured to be executed while resident in a non-application space of the mobile device, and wherein the non-application space is distinct from the application space.

3. The mobile device of claim 2 , wherein the triggering event comprises an insertion event requesting to insert at least a requested amount of memory into the cache, and wherein the functions further comprise:

responsive to determining that the memory limit for the application is not within the threshold amount of being exceeded, allocating the at least the requested amount of memory to the cache using the memory manager.

4. The mobile device of claim 2 , wherein the functions further comprise:

after instructing the application to cease utilization of the portion of memory currently allocated to the cache, the memory manager:

determining that the application has ceased utilization of the portion of memory; and

deallocating the portion of memory.

5. The mobile device of claim 4 , wherein the memory manager comprises a garbage collector, and wherein determining that the application has ceased utilization of the portion of memory comprises determining, using the garbage collector, that the application has ceased utilization of the portion of memory; and wherein deallocating the portion of memory comprises deallocating the portion of memory using the garbage collector.

6. The mobile device of claim 1 , wherein the application comprises a plurality of threads, wherein each thread of the plurality of threads is configured to perform one or more tasks for the application, wherein the plurality of threads comprises a plurality of caching threads, wherein each caching thread is configured to utilize a cache to perform the one or more tasks for the caching thread, wherein the plurality of caching threads comprises one or more registered caching threads, and wherein each registered caching thread is configured to be registered with the global cache manager.

7. The mobile device of claim 6 , wherein the functions further comprise:

for each registered caching thread, registering the registered caching thread with the global cache manager; and

wherein instructing the application to cease utilization of the portion of memory currently allocated to the cache comprises instructing each registered caching thread of the one or more registered caching threads to cease utilization of a respective portion of its respective cache.

8. The mobile device of claim 6 , wherein the plurality of caching threads comprises one or more non-registered caching threads, and wherein each non-registered caching thread of the one or more non-registered caching threads is not registered with the global cache manager.

9. The mobile device of claim 1 , wherein instructing the application to cease utilization of the portion of memory currently allocated to the cache comprises instructing the application to cease utilization of a predetermined percentage of the portion of memory currently allocated to the cache.

10. The mobile device of claim 1 , wherein instructing the application to cease utilization of the portion of memory currently allocated to the cache comprises instructing the application to cease utilization of a portion of memory that is least recently used by the cache.

11. The mobile device of claim 1 , wherein the triggering event is an event selected from the group consisting of: an insertion event requesting to insert a requested amount of memory into the cache, a memory-allocation-notification event, and a timer expiration event.

12. The mobile device of claim 1 , wherein the threshold amount is specified as a predetermined percentage of the memory limit.

13. An article of manufacture including a computer-readable storage medium having instructions stored thereon that, when executed by a processor of the article of manufacture, cause the article of manufacture to perform functions comprising:

receiving, at a global cache manager, an indication of a triggering event related to memory allocated for an application, wherein the global cache manager is distinct from the application, wherein the article of manufacture comprises a non-application space and an application space, wherein the non-application space is distinct from the application space, and wherein the non-application space is configured to store an operating system of the article of manufacture;

responsively determining, using the global cache manager associated with the processor, an amount of memory currently allocated to the application, wherein the global cache manager is configured to manage a cache of memory for one or more applications that include, the application, and wherein the global cache manager and the one or more applications are configured to execute while resident in an application space of the mobile device;

determining, using the global cache manager, whether a memory limit for the application is within a threshold amount of being exceeded by the amount of memory currently allocated to the application; and

responsive to determining that the memory limit for the application is within the threshold amount of being exceeded, the global cache manager instructing the application to cease utilization of a portion of memory currently allocated to the cache.

14. The article of manufacture of claim 13 , wherein the functions further comprise:

after instructing the application to cease utilization of the portion of memory currently allocated to the cache, using a memory manager separate from the global cache manager for:

determining that the application has ceased utilization of the portion of memory; and

deallocating the portion of memory, wherein the memory manager is configured to execute while resident in a non-application space of the mobile device, and wherein the non-application space is distinct from the application space.

15. The article of manufacture of claim 14 , wherein the memory manager comprises a garbage collector, and wherein determining that the application has ceased utilization of the portion of memory comprises determining, using the garbage collector, that the application has ceased utilization of the portion of memory; and wherein deallocating the portion of memory comprises deallocating the portion of memory using the garbage collector.

16. The article of manufacture of claim 13 , wherein the application comprises a plurality of threads, wherein each thread of the plurality of threads is configured to perform one or more tasks for the application, wherein the plurality of threads comprises a plurality of caching threads, wherein each caching thread is configured to utilize a cache to perform the one or more tasks for the caching thread, wherein the plurality of caching threads comprises one or more registered caching threads, and wherein each registered caching thread is configured to be registered with the global cache manager.

17. The article of manufacture of claim 16 , wherein the functions further comprise:

for each registered caching thread, registering the registered caching thread with the global cache manager; and

wherein instructing the application to cease utilization of the portion of memory currently allocated to the cache comprises instructing each registered caching thread of the one or more registered caching threads to cease utilization of a respective portion of its respective cache.

18. The article of manufacture of claim 13 , wherein instructing the application to cease utilization of the portion of memory currently allocated to the cache comprises instructing the application to cease utilization of a predetermined percentage of the portion of memory currently allocated to the cache.

19. The article of manufacture of claim 13 , wherein the triggering event is an event selected from the group consisting of: an insertion event requesting to insert a requested amount of memory into the cache, a memory-allocation notification event, and a timer expiration event.

20. The article of manufacture of claim 13 , wherein the threshold amount is specified as a predetermined percentage of the memory limit.

21. A method, comprising:

receiving, at a global cache manager associated with a mobile device, an indication of a triggering event related to memory allocated for an application, wherein the mobile device comprises a non-application space and an application space, wherein the non-application space is distinct from the application space, and wherein the non-application space is configured to store an operating system of the mobile device;

responsively determining, using the global cache manager, an amount of memory currently allocated to the application, wherein the global cache manager is configured to manage a cache of memory for one or more applications, wherein the one or more applications comprise the application, and wherein the global cache manager and the one or more applications are configured to execute while resident in an application space of the mobile device;

determining, using the global cache manager, whether a memory limit for the application is within a threshold amount of being exceeded by the amount of memory currently allocated to the application, wherein the global cache manager is distinct from the application; and

responsive to determining that the memory limit for the application is within the threshold amount of being exceeded, the global cache manager instructing the application to cease utilization of a portion of memory currently allocated to the cache.

22. The method of claim 21 , wherein the mobile device further comprises a memory manager that is separate from the global cache manager, wherein the memory manager is configured to be executed while resident in a non-application space of the mobile device, and wherein the non-application space is distinct from the application space.

Assignments (2)
CHANGE OF NAME Recorded Oct 2, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044566/0657 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 19, 2013
From: DALY, FERGAL MICHAEL
To: GOOGLE INC.
Reel/Frame 031244/0759 →