This commit is contained in:
Exusial 2025-02-26 16:21:30 +08:00
parent 593519203b
commit 449874356d
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ EXTERN_LIB bool no_cuda_error_when_free;
struct CudaDualAllocator : Allocator {
//for recycle block_id
static const size_t ID_LIMIT = 1 << 16;
static const size_t ID_LIMIT = 1 << 20;
int n_free_ids;
int free_ids[ID_LIMIT];
DualAllocation allocations[ID_LIMIT];

View File

@ -36,7 +36,7 @@ struct CachingBlockPool {
//start from 1
static size_t tot_block_id;
static std::unique_ptr<CachingBlock*[]> occupied_id_mapper;
static const size_t ID_LIMIT = 1 << 18;
static const size_t ID_LIMIT = 1 << 21;
pair<size_t,size_t> get_key(CachingBlock* block);

View File

@ -23,7 +23,7 @@ struct TempCachingBlock {
struct TempAllocator : Allocator {
static const size_t ALIGN_SIZE = 512;
static const size_t ID_LIMIT = 1 << 18;
static const size_t ID_LIMIT = 1 << 21;
static vector<TempAllocator*> temp_allocators;
Allocator* underlying;
size_t cache_blocks_limit, used_memory, unused_memory;