The boost documentation as below:
Note
The underlying
singleton_pool
used by the this allocator constructs a pool instance that is never freed. This means that memory allocated by the allocator can be still used aftermain()
has completed, but may mean that some memory checking programs will complain about leaks.
I am confused since I checked the code and the singleton_pool
still seem to be created only on the heap of the current process. I.e. if the process is killed by the OS, such pool will be released anyway? Then the above notes merely means if some daemon thread keeps on and such pool is still available after main()? Or it actually means the pool won't be released even after the entire process is killed?
It also seems to me both pool_allocator
and fast_pool_allocator
are using the identical mechanism to allocate memory i.e. from such a singleton_pool
singleton. However this note isn't specified for the fast_pool_allocator
. I would reckon both of them behaves the same for such a note above. Am I correct?
Please help. Thanks.