ktf wrote:

@s-barannikov, AFAICT, that would not work because the overwrite is not 
unconditional, but it will actually check for default initialised content. 
Basically the current mechanics relies on default initialisation rather than 
being "uninitialised". This for sure does not work with LoadedDecls (I just 
checked). 

I even thought to have a `std::pmr::vector` backed by `calloc`, so that 
uninitialised parts are guaranteed to be zero-ed. However in the end I 
considered such implementation more complicated and I went for what I have in 
this PR (especially because I am not sure `std::pmr*` are actually allowed in 
the codebase).

Besides the above considerations, at least for my use case, I also noticed the 
page granularity is actually not good enough to guarantee good memory savings 
(that's why I use 1024 / sizeof(T)).

https://github.com/llvm/llvm-project/pull/66430
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to