You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have run and test your code.And my debug envornment is ubuntu22 linux 5.19 clang++ 14
The problem may caused by that the default blockSize is 4096.If you use AddressSanitizer you will find that the this code will always error at i==1021(1021*4+some util mem). Every time before you want to allocate a piece of memory from this pool ,you should find out if it has enough memory or catch the error. Or just set a1 bigger BlockSize.
i have run and test your code.And my debug envornment is ubuntu22 linux 5.19 clang++ 14 The problem may caused by that the default blockSize is 4096.If you use AddressSanitizer you will find that the this code will always error at i==1021(1021*4+some util mem). Every time before you want to allocate a piece of memory from this pool ,you should find out if it has enough memory or catch the error. Or just set a1 bigger BlockSize.
If there is not enough memory, shouldn't a new block be generated? Why increase the size of the block?
The text was updated successfully, but these errors were encountered: