SALLOC is a thread-safe arena allocator (memory manager) in CUDA.
SALLOC has been developed as part of the project "Smart Data Structures in CUDA" with CERN-HSF for Google Summer of Code 2017.
- Thread-safe arena allocator for GPUs in CUDA.
- Supports thread-safe vector container in CUDA.
- Support for multiple vectors on the arena. These vectors are shared across threads.
- The vector container supports the following operations:
- push_back()
- pop_back()
- getIndex()
- vecSize()
A detailed documentation on SALLOC can be found in SALLOC_description.txt.
- CUDA version >= 8.0
- gcc version >= 5.3.0
-
Clone the code into a directory called SALLOC
git clone --branch=master https://github.com/ssomesh/SALLOC
-
The source for arena allocator SALLOC is present in the file salloc.h
-
No installation or build is required.
- Include "salloc.h" (with the proper path) in the CUDA code and use.
- driver.cu contains a sample program that uses SALLOC.
- Compile driver.cu and execute
nvcc driver.cu -std=c++11 -o driver ./driver
- Compile driver.cu and execute
- SALLOC has been tested on NVIDIA Pascal (GeForce GTX 1080) GPU.
- Support resize() operation on vector container allocated on the arena.
- Support reclaiming of free chunks in the arena to better utilize the space on the arena.
- Felice Pantaleo (felice.pantaleo (at) cern.ch)
- Somesh Singh (somesh.singh1992 (at) gmail.com)