IP Library Granted Patent US 11,073,995
Granted Patent B2
US 11,073,995 · App. 16/848,064 · Granted Jul 27, 2021

Implementing scalable memory allocation using identifiers that return a succinct pointer representation

Inventor: Alexander Dodd Breslow (Sunnyvale, CA)
Assignee: Advanced Micro Devices, Inc.
G06F3/0631G06F3/0604G06F3/0673G06F12/1018G06F2212/1044G06F2212/657
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 11,073,995
App. No.
16/848,064
Granted
Jul 27, 2021
Kind
B2
Abstract

A method and device generates a slab identifier and a hash function identifier in response to a memory allocation request with a request identifier and allocation size from a memory allocation requestor. The slab identifier indicates a memory region associated with a base data size and the hash function identifier indicates a hash function. The method and device provides a bit string including the slab identifier and the hash function identifier to the memory allocation requestor.

Claims (52)

1. A device comprising:

a memory comprising a memory region,

a memory allocation requestor configured to:

generate a memory allocation request, and

store data in the memory region,

a memory allocation logic configured to: in response to a memory allocation request from the memory allocation requestor,

generate a slab identifier and a hash function identifier indicating a hash function, wherein the slab identifier indicates the memory region associated with a base data size, and

provide, to the memory allocation requestor, a bit string comprising the slab identifier and the hash function identifier.

2. The device of claim 1 , wherein the memory is a system memory.

3. The device of claim 1 , wherein the memory allocation logic generates the slab identifier and the hash function identifier by:

generating a concatenated tuple comprising the slab identifier and the hash function identifier.

4. The device of claim 1 , wherein the memory allocation request comprises the base data size and a request identifier, and wherein the memory allocation logic generates the slab identifier and the hash function identifier by:

generating the hash function identifier based on the request identifier corresponding to the memory allocation request; and

generating the slab identifier based on the base data size.

5. The device of claim 4 , wherein:

the request identifier comprises a virtual memory address; and

the memory allocation logic generates the hash function identifier based on the virtual memory address.

6. The device of claim 4 , wherein:

the request identifier comprises a physical memory address; and

the memory allocation logic generates the hash function identifier based on the physical memory address.

7. The device of claim 4 , wherein the memory allocation logic is further configured to:

based on comparing slab metadata corresponding to a plurality of slabs with the base data size, determine a subset of the plurality of slabs corresponding to the base data size, wherein each of the plurality of slabs indicates a distinct memory region; and

select, from the subset of the plurality of slabs, a memory location to store data corresponding to the memory allocation request, wherein the generating the slab identifier and the hash function identifier is based on the memory location.

8. The device of claim 7 , wherein the memory allocation logic is further configured to:

determine, based on the request identifier and a plurality of hash functions, a plurality of candidate slots from the subset of the plurality of slabs, wherein the selecting the memory location is based on the plurality of candidate slots.

9. The device of claim 8 , wherein the memory allocation logic is further configured to:

determine, based on the plurality of candidate slots, a viable candidate slot indicating the memory location; and

store the data in the memory location.

10. The device of claim 9 , wherein the memory allocation logic is further configured to:

determine a bit vector corresponding to the plurality of candidate slots within the subset of the plurality of slabs; and

determine, based on performing an operation on the bit vector, the viable candidate slot.

11. The device of claim 10 , wherein the memory allocation logic performs the operation on the bit vector by performing an atomic operation on the bit vector.

12. The device of claim 10 wherein the memory allocation logic performs the operation on the bit vector by performing a read operation on the bit vector, a set operation on the bit vector, and an update operation on the bit vector.

13. The device of claim 10 , wherein the memory allocation logic is further configured to:

perform an atomic update operation to update the bit vector based on storing the data in the memory location.

14. The device of claim 13 , wherein the memory allocation logic performs the atomic update operation to update the bit vector by performing an atomic OR operation.

15. The device of claim 13 , wherein the memory allocation logic performs the atomic update operation to update the bit vector by performing an atomic Compare-and-Exchange operation.

16. The device of claim 1 , wherein the memory allocation logic is further configured to:

retrieve data corresponding to the memory allocation request based on the slab identifier and the hash function identifier.

17. A method for implementing memory allocation comprising:

generating a memory allocation request by a memory allocation requestor;

in response to the memory allocation request from the memory allocation requestor,

generating a slab identifier and a hash function identifier indicating a hash function, wherein the slab identifier indicates a memory region associated with a base data size, and

providing, to the memory allocation requestor, a bit string comprising the slab identifier and the hash function identifier.

18. The method of claim 17 wherein generating the slab identifier and the hash function identifier comprises:

generating a concatenated tuple comprising the slab identifier and the hash function identifier and wherein the respective processor memory is configured as cache memory.

19. The method of claim 17 , wherein the memory allocation request comprises the base data size and a request identifier, and wherein the memory allocation logic generates the slab identifier and the hash function identifier by:

generating the hash function identifier based on the request identifier corresponding to the memory allocation request; and

generating the slab identifier based on the base data size.

20. The method of claim 19 , wherein:

the request identifier comprises a virtual memory address; and

the generating the hash function identifier is based on the virtual memory address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 23, 2021
From: BRESLOW, ALEXANDER DODD
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 056632/0029 →
Continuity (2)
Continuation 16111560 · Aug 24, 2018
Related Publication 20200241775A1 · Jul 30, 2020