发明名称 Parallel dynamic memory allocation using a lock-free FIFO
摘要 One embodiment of the present invention sets forth a technique for dynamically allocating memory using one or more lock-free FIFOs. One or more lock-free FIFOs are populated with FIFO nodes, where each FIFO node represents a memory allocation of a predetermined size. Each particular lock-free FIFO includes memory allocations of a single size. Different lock-free FIFOs may include memory allocations for different sizes to service allocation requests for different size memory allocations. A lock-free mechanism is used to pop FIFO nodes from the FIFO. The use of the lock-free FIFO allows multiple consumers to simultaneously attempt to pop the head FIFO node without first obtaining a lock to ensure exclusive access of the FIFO.
申请公布号 US9542227(B2) 申请公布日期 2017.01.10
申请号 US201213361816 申请日期 2012.01.30
申请人 NVIDIA Corporation 发明人 Jones Stephen;Huang Xiaohuang
分类号 G06F12/02;G06F9/50;G06F9/52 主分类号 G06F12/02
代理机构 Artegis Law Group, LLP 代理人 Artegis Law Group, LLP
主权项 1. A method of allocating memory, the method comprising: receiving a plurality of memory allocation requests from a plurality of threads, wherein each memory allocation request specifies an amount of memory; identifying a first-in first-out sub-system (FIFO) node size based on the amounts of memory associated with the plurality of memory allocation requests; selecting a first FIFO included in a plurality of FIFOs and populated with FIFO nodes of the FIFO node size; popping a first FIFO head node from the first FIFO to satisfy the memory allocation request associated with a first thread included in the plurality of threads; determining that all of the FIFO nodes that populate the first FIFO have been freed; and in response, retiring the first FIFO.
地址 Santa Clara CA US