Skip to content

Can MemoryAllocator set max capacity? #4137

Answered by xiaoxmeng
Yohahaha asked this question in Q&A
Discussion options

You must be logged in to vote

The memory reservation callback will always be set to enforce memory limit by MemoryPool. Unlike MmapAllocator, MallocAllocator doesn't need to check capacity as it delegates the memory allocations to std::malloc. MmapAllocator manages the mmaped memory space by itself so needs the capacity enforcement.

There is no updated design as for now but we will publish one soon.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Yohahaha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants